| 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 // VMOptions= | 5 // VMOptions= |
| 6 // VMOptions=--short_socket_read | 6 // VMOptions=--short_socket_read |
| 7 // VMOptions=--short_socket_write | 7 // VMOptions=--short_socket_write |
| 8 // VMOptions=--short_socket_read --short_socket_write | 8 // VMOptions=--short_socket_read --short_socket_write |
| 9 | 9 |
| 10 import "package:expect/expect.dart"; | 10 import "package:expect/expect.dart"; |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 } else if (!handshakeBeforeSecure) { | 411 } else if (!handshakeBeforeSecure) { |
| 412 RawSecureSocket.secureServer(client, CERTIFICATE).then((client) { | 412 RawSecureSocket.secureServer(client, CERTIFICATE).then((client) { |
| 413 runServer(client).then((_) => server.close()); | 413 runServer(client).then((_) => server.close()); |
| 414 }); | 414 }); |
| 415 } else { | 415 } else { |
| 416 runServerHandshake(client).then((secure) { | 416 runServerHandshake(client).then((secure) { |
| 417 RawSecureSocket.secureServer( | 417 RawSecureSocket.secureServer( |
| 418 client, | 418 client, |
| 419 CERTIFICATE, | 419 CERTIFICATE, |
| 420 subscription: secure[0], | 420 subscription: secure[0], |
| 421 carryOverData: secure[1]).then((client) { | 421 bufferedData: secure[1]).then((client) { |
| 422 runServer(client).then((_) => server.close()); | 422 runServer(client).then((_) => server.close()); |
| 423 }); | 423 }); |
| 424 }); | 424 }); |
| 425 } | 425 } |
| 426 }); | 426 }); |
| 427 | 427 |
| 428 connectClient(server.port).then(runClient).then((socket) { | 428 connectClient(server.port).then(runClient).then((socket) { |
| 429 socket.close(); | 429 socket.close(); |
| 430 port.close(); | 430 port.close(); |
| 431 }); | 431 }); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 454 testSimpleConnectFail("not_a_nickname", true); | 454 testSimpleConnectFail("not_a_nickname", true); |
| 455 testSimpleConnectFail("CN=notARealDistinguishedName", true); | 455 testSimpleConnectFail("CN=notARealDistinguishedName", true); |
| 456 testServerListenAfterConnect(); | 456 testServerListenAfterConnect(); |
| 457 testSimpleReadWrite(true, true, false); | 457 testSimpleReadWrite(true, true, false); |
| 458 testSimpleReadWrite(true, false, false); | 458 testSimpleReadWrite(true, false, false); |
| 459 testSimpleReadWrite(false, true, false); | 459 testSimpleReadWrite(false, true, false); |
| 460 testSimpleReadWrite(false, false, false); | 460 testSimpleReadWrite(false, false, false); |
| 461 testSimpleReadWrite(false, false, true, true); | 461 testSimpleReadWrite(false, false, true, true); |
| 462 testSimpleReadWrite(false, false, true, false); | 462 testSimpleReadWrite(false, false, true, false); |
| 463 } | 463 } |
| OLD | NEW |