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 "io.dart"; | 5 part of "dart:io"; |
6 | 6 |
7 /** | 7 /** |
8 * WebSocket status codes used when closing a WebSocket connection. | 8 * WebSocket status codes used when closing a WebSocket connection. |
9 */ | 9 */ |
10 abstract class WebSocketStatus { | 10 abstract class WebSocketStatus { |
11 static const int NORMAL_CLOSURE = 1000; | 11 static const int NORMAL_CLOSURE = 1000; |
12 static const int GOING_AWAY = 1001; | 12 static const int GOING_AWAY = 1001; |
13 static const int PROTOCOL_ERROR = 1002; | 13 static const int PROTOCOL_ERROR = 1002; |
14 static const int UNSUPPORTED_DATA = 1003; | 14 static const int UNSUPPORTED_DATA = 1003; |
15 static const int RESERVED_1004 = 1004; | 15 static const int RESERVED_1004 = 1004; |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 void addUtf8Text(List<int> bytes); | 415 void addUtf8Text(List<int> bytes); |
416 } | 416 } |
417 | 417 |
418 class WebSocketException implements IOException { | 418 class WebSocketException implements IOException { |
419 final String message; | 419 final String message; |
420 | 420 |
421 const WebSocketException([this.message = ""]); | 421 const WebSocketException([this.message = ""]); |
422 | 422 |
423 String toString() => "WebSocketException: $message"; | 423 String toString() => "WebSocketException: $message"; |
424 } | 424 } |
OLD | NEW |