Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: tests/standalone/io/socket_close_test.dart

Issue 14640008: Change the signature for all network bind calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments by whesse@ Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // Test socket close events. 10 // Test socket close events.
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 332
333 void dispatch(message, SendPort replyTo) { 333 void dispatch(message, SendPort replyTo) {
334 _donePort = replyTo; 334 _donePort = replyTo;
335 if (message != SERVERSHUTDOWN) { 335 if (message != SERVERSHUTDOWN) {
336 _readBytes = 0; 336 _readBytes = 0;
337 _errorEvents = 0; 337 _errorEvents = 0;
338 _dataEvents = 0; 338 _dataEvents = 0;
339 _closeEvents = 0; 339 _closeEvents = 0;
340 _iterations = 0; 340 _iterations = 0;
341 _mode = message; 341 _mode = message;
342 ServerSocket.bind().then((server) { 342 ServerSocket.bind("127.0.0.1", 0).then((server) {
343 _server = server; 343 _server = server;
344 _server.listen( 344 _server.listen(
345 (socket) { 345 (socket) {
346 var data = new ConnectionData(socket); 346 var data = new ConnectionData(socket);
347 connectionHandler(data); 347 connectionHandler(data);
348 }, 348 },
349 onError: errorHandlerServer 349 onError: errorHandlerServer
350 ); 350 );
351 replyTo.send(_server.port, null); 351 replyTo.send(_server.port, null);
352 }); 352 });
(...skipping 25 matching lines...) Expand all
378 var tests = 7; 378 var tests = 7;
379 var port = new ReceivePort(); 379 var port = new ReceivePort();
380 var completed = 0; 380 var completed = 0;
381 port.receive((message, ignore) { 381 port.receive((message, ignore) {
382 if (++completed == tests) port.close(); 382 if (++completed == tests) port.close();
383 }); 383 });
384 for (var i = 0; i < tests; i++) { 384 for (var i = 0; i < tests; i++) {
385 new SocketClose.start(i, port.toSendPort()); 385 new SocketClose.start(i, port.toSendPort());
386 } 386 }
387 } 387 }
OLDNEW
« no previous file with comments | « tests/standalone/io/secure_session_resume_test.dart ('k') | tests/standalone/io/socket_exception_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698