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

Side by Side Diff: runtime/bin/socket_patch.dart

Issue 12095014: IO v2: Update a number of HTTP tests to pass (Closed) Base URL: http://dart.googlecode.com/svn/experimental/lib_v2_io/dart/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | sdk/lib/io/http.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 patch class RawServerSocket { 5 patch class RawServerSocket {
6 /* patch */ static Future<RawServerSocket> bind([String address = "127.0.0.1", 6 /* patch */ static Future<RawServerSocket> bind([String address = "127.0.0.1",
7 int port = 0, 7 int port = 0,
8 int backlog = 0]) { 8 int backlog = 0]) {
9 return _RawServerSocket.bind(address, port, backlog); 9 return _RawServerSocket.bind(address, port, backlog);
10 } 10 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 static Future<_NativeSocket> bind(String address, 113 static Future<_NativeSocket> bind(String address,
114 int port, 114 int port,
115 int backlog) { 115 int backlog) {
116 var socket = new _NativeSocket.listen(); 116 var socket = new _NativeSocket.listen();
117 var result = socket.nativeCreateBindListen(address, port, backlog); 117 var result = socket.nativeCreateBindListen(address, port, backlog);
118 if (result is OSError) { 118 if (result is OSError) {
119 return new Future.immediateError( 119 return new Future.immediateError(
120 new SocketIOException("Failed to create server socket", result)); 120 new SocketIOException("Failed to create server socket", result));
121 } 121 }
122 if (port != 0) result.localPort = port; 122 if (port != 0) socket.localPort = port;
123 return new Future.immediate(socket); 123 return new Future.immediate(socket);
124 } 124 }
125 125
126 _NativeSocket.normal() : typeFlags = TYPE_NORMAL_SOCKET { 126 _NativeSocket.normal() : typeFlags = TYPE_NORMAL_SOCKET {
127 eventHandlers = new List.fixedLength(EVENT_COUNT + 1); 127 eventHandlers = new List.fixedLength(EVENT_COUNT + 1);
128 _EventHandler._start(); 128 _EventHandler._start();
129 } 129 }
130 130
131 _NativeSocket.listen() : typeFlags = TYPE_LISTENING_SOCKET { 131 _NativeSocket.listen() : typeFlags = TYPE_LISTENING_SOCKET {
132 eventHandlers = new List.fixedLength(EVENT_COUNT + 1); 132 eventHandlers = new List.fixedLength(EVENT_COUNT + 1);
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 _raw.onBadCertificate = callback; 950 _raw.onBadCertificate = callback;
951 } 951 }
952 952
953 X509Certificate get peerCertificate { 953 X509Certificate get peerCertificate {
954 if (_raw == null) { 954 if (_raw == null) {
955 throw new StateError("peerCertificate called on destroyed SecureSocket"); 955 throw new StateError("peerCertificate called on destroyed SecureSocket");
956 } 956 }
957 return _raw.peerCertificate; 957 return _raw.peerCertificate;
958 } 958 }
959 } 959 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/http.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698