OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // Test socket close events. | 5 // Test socket close events. |
6 | 6 |
| 7 #import("dart:io"); |
7 | 8 |
8 final SERVERSHUTDOWN = -1; | 9 final SERVERSHUTDOWN = -1; |
9 final ITERATIONS = 10; | 10 final ITERATIONS = 10; |
10 | 11 |
11 | 12 |
12 class SocketClose { | 13 class SocketClose { |
13 | 14 |
14 SocketClose.start(mode) | 15 SocketClose.start(mode) |
15 : _receivePort = new ReceivePort(), | 16 : _receivePort = new ReceivePort(), |
16 _sendPort = null, | 17 _sendPort = null, |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 // 5: Client sends. Server responds and half closes. | 316 // 5: Client sends. Server responds and half closes. |
316 // 6: Client sends and half-closes. Server responds and half closes. | 317 // 6: Client sends and half-closes. Server responds and half closes. |
317 new SocketClose.start(0); | 318 new SocketClose.start(0); |
318 new SocketClose.start(1); | 319 new SocketClose.start(1); |
319 new SocketClose.start(2); | 320 new SocketClose.start(2); |
320 new SocketClose.start(3); | 321 new SocketClose.start(3); |
321 new SocketClose.start(4); | 322 new SocketClose.start(4); |
322 new SocketClose.start(5); | 323 new SocketClose.start(5); |
323 new SocketClose.start(6); | 324 new SocketClose.start(6); |
324 } | 325 } |
OLD | NEW |