| 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 patch class RawServerSocket { | 5 patch class RawServerSocket { |
| 6 /* patch */ static Future<RawServerSocket> bind(address, | 6 /* patch */ static Future<RawServerSocket> bind(address, |
| 7 int port, | 7 int port, |
| 8 {int backlog: 0, | 8 {int backlog: 0, |
| 9 bool v6Only: false}) { | 9 bool v6Only: false}) { |
| 10 return _RawServerSocket.bind(address, port, backlog, v6Only); | 10 return _RawServerSocket.bind(address, port, backlog, v6Only); |
| 11 } | 11 } |
| 12 } | 12 } |
| 13 | 13 |
| 14 | 14 |
| 15 patch class RawSocket { | 15 patch class RawSocket { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 type, address, host, new Uint8List.fromList(_sockaddr_storage)); | 138 type, address, host, new Uint8List.fromList(_sockaddr_storage)); |
| 139 } | 139 } |
| 140 | 140 |
| 141 String toString() { | 141 String toString() { |
| 142 return "InternetAddress('$address', ${type.name})"; | 142 return "InternetAddress('$address', ${type.name})"; |
| 143 } | 143 } |
| 144 | 144 |
| 145 static Uint8List _fixed(int id) native "InternetAddress_Fixed"; | 145 static Uint8List _fixed(int id) native "InternetAddress_Fixed"; |
| 146 } | 146 } |
| 147 | 147 |
| 148 class _NetworkInterface implements NetworkInterface{ | 148 class _NetworkInterface implements NetworkInterface { |
| 149 final String name; | 149 final String name; |
| 150 final List<InternetAddress> addresses; | 150 final List<InternetAddress> addresses; |
| 151 | 151 |
| 152 _NetworkInterface(String this.name, List<InternetAddress> this.addresses); | 152 _NetworkInterface(String this.name, List<InternetAddress> this.addresses); |
| 153 | 153 |
| 154 String toString() { | 154 String toString() { |
| 155 return "NetworkInterface('$name', $addresses)"; | 155 return "NetworkInterface('$name', $addresses)"; |
| 156 } | 156 } |
| 157 } | 157 } |
| 158 | 158 |
| (...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1220 if (_detachReady != null) { | 1220 if (_detachReady != null) { |
| 1221 _detachReady.complete(null); | 1221 _detachReady.complete(null); |
| 1222 } else { | 1222 } else { |
| 1223 if (_raw != null) { | 1223 if (_raw != null) { |
| 1224 _raw.shutdown(SocketDirection.SEND); | 1224 _raw.shutdown(SocketDirection.SEND); |
| 1225 _disableWriteEvent(); | 1225 _disableWriteEvent(); |
| 1226 } | 1226 } |
| 1227 } | 1227 } |
| 1228 } | 1228 } |
| 1229 } | 1229 } |
| OLD | NEW |