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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 // 5: Client sends. Server responds and half closes. | 326 // 5: Client sends. Server responds and half closes. |
326 // 6: Client sends and half-closes. Server responds and half closes. | 327 // 6: Client sends and half-closes. Server responds and half closes. |
327 new SocketClose.start(0); | 328 new SocketClose.start(0); |
328 new SocketClose.start(1); | 329 new SocketClose.start(1); |
329 new SocketClose.start(2); | 330 new SocketClose.start(2); |
330 new SocketClose.start(3); | 331 new SocketClose.start(3); |
331 new SocketClose.start(4); | 332 new SocketClose.start(4); |
332 new SocketClose.start(5); | 333 new SocketClose.start(5); |
333 new SocketClose.start(6); | 334 new SocketClose.start(6); |
334 } | 335 } |
OLD | NEW |