OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart.io; | 5 part of dart.io; |
6 | 6 |
7 /** | 7 /** |
8 * Web socket status codes used when closing a web socket connection. | 8 * Web socket status codes used when closing a web socket connection. |
9 */ | 9 */ |
10 abstract class WebSocketStatus { | 10 abstract class WebSocketStatus { |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 /** | 147 /** |
148 * Sends data from a stream on web socket connection. Each data event from | 148 * Sends data from a stream on web socket connection. Each data event from |
149 * [stream] will be send as a single WebSocket frame. The data from [stream] | 149 * [stream] will be send as a single WebSocket frame. The data from [stream] |
150 * must be either [:String:]s, or [:List<int>:]s holding bytes. | 150 * must be either [:String:]s, or [:List<int>:]s holding bytes. |
151 */ | 151 */ |
152 Future addStream(Stream stream); | 152 Future addStream(Stream stream); |
153 } | 153 } |
154 | 154 |
155 | 155 |
156 class WebSocketException implements Exception { | 156 class WebSocketException implements IOException { |
157 const WebSocketException([String this.message = ""]); | 157 const WebSocketException([String this.message = ""]); |
158 String toString() => "WebSocketException: $message"; | 158 String toString() => "WebSocketException: $message"; |
159 final String message; | 159 final String message; |
160 } | 160 } |
OLD | NEW |