OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 library dart.io; |
| 6 |
| 7 import "package:async_helper/async_helper.dart"; |
| 8 import "package:expect/expect.dart"; |
| 9 import "dart:async"; |
| 10 import "dart:collection"; |
5 import "dart:convert"; | 11 import "dart:convert"; |
6 import "dart:math"; | 12 import "dart:math"; |
7 import "dart:async"; | |
8 import "dart:collection"; | |
9 import "dart:typed_data"; | 13 import "dart:typed_data"; |
10 import "dart:isolate"; | 14 import "dart:isolate"; |
11 | 15 |
12 import "package:async_helper/async_helper.dart"; | 16 part "../../../sdk/lib/io/bytes_builder.dart"; |
13 import "package:expect/expect.dart"; | 17 part "../../../sdk/lib/io/common.dart"; |
14 | 18 part "../../../sdk/lib/io/crypto.dart"; |
15 part '../../../sdk/lib/io/common.dart'; | 19 part "../../../sdk/lib/io/data_transformer.dart"; |
| 20 part "../../../sdk/lib/io/directory.dart"; |
| 21 part "../../../sdk/lib/io/directory_impl.dart"; |
| 22 part "../../../sdk/lib/io/file.dart"; |
| 23 part "../../../sdk/lib/io/file_impl.dart"; |
| 24 part "../../../sdk/lib/io/file_system_entity.dart"; |
| 25 part "../../../sdk/lib/io/link.dart"; |
16 part "../../../sdk/lib/io/http.dart"; | 26 part "../../../sdk/lib/io/http.dart"; |
17 part "../../../sdk/lib/io/bytes_builder.dart"; | 27 part "../../../sdk/lib/io/http_impl.dart"; |
| 28 part "../../../sdk/lib/io/http_date.dart"; |
| 29 part "../../../sdk/lib/io/http_parser.dart"; |
| 30 part "../../../sdk/lib/io/http_headers.dart"; |
| 31 part "../../../sdk/lib/io/http_session.dart"; |
| 32 part "../../../sdk/lib/io/io_service.dart"; |
18 part "../../../sdk/lib/io/io_sink.dart"; | 33 part "../../../sdk/lib/io/io_sink.dart"; |
19 part "../../../sdk/lib/io/string_transformer.dart"; | 34 part "../../../sdk/lib/io/platform.dart"; |
| 35 part "../../../sdk/lib/io/platform_impl.dart"; |
| 36 part "../../../sdk/lib/io/secure_socket.dart"; |
| 37 part "../../../sdk/lib/io/secure_server_socket.dart"; |
| 38 part "../../../sdk/lib/io/socket.dart"; |
20 part "../../../sdk/lib/io/websocket.dart"; | 39 part "../../../sdk/lib/io/websocket.dart"; |
21 part "../../../sdk/lib/io/websocket_impl.dart"; | 40 part "../../../sdk/lib/io/websocket_impl.dart"; |
22 | 41 |
23 class WebSocketFrame { | 42 class WebSocketFrame { |
24 WebSocketFrame(int opcode, List<int> data); | 43 WebSocketFrame(int opcode, List<int> data); |
25 } | 44 } |
26 | 45 |
27 // Class that when hooked up to the web socket protocol transformer will | 46 // Class that when hooked up to the web socket protocol transformer will |
28 // collect the message and expect it to be equal to the | 47 // collect the message and expect it to be equal to the |
29 // expectedMessage field when fully received. | 48 // expectedMessage field when fully received. |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 true, FRAME_OPCODE_BINARY, null, message, 0, message.length); | 261 true, FRAME_OPCODE_BINARY, null, message, 0, message.length); |
243 controller.add(frame); | 262 controller.add(frame); |
244 } | 263 } |
245 | 264 |
246 | 265 |
247 void main() { | 266 void main() { |
248 testFullMessages(); | 267 testFullMessages(); |
249 testFragmentedMessages(); | 268 testFragmentedMessages(); |
250 testUnmaskedMessage(); | 269 testUnmaskedMessage(); |
251 } | 270 } |
OLD | NEW |