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 part of dart.io; | 5 part of dart.io; |
6 | 6 |
7 | 7 |
8 /** | 8 /** |
9 * [InternetAddressType] is the type an [InternetAddress]. Currently, | 9 * [InternetAddressType] is the type an [InternetAddress]. Currently, |
10 * IP version 4 (IPv4) and IP version 6 (IPv6) are supported. | 10 * IP version 4 (IPv4) and IP version 6 (IPv6) are supported. |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 * using the [:port:] getter. | 220 * using the [:port:] getter. |
221 * | 221 * |
222 * The optional argument [backlog] can be used to specify the listen | 222 * The optional argument [backlog] can be used to specify the listen |
223 * backlog for the underlying OS listen setup. If [backlog] has the | 223 * backlog for the underlying OS listen setup. If [backlog] has the |
224 * value of [:0:] (the default) a reasonable value will be chosen by | 224 * value of [:0:] (the default) a reasonable value will be chosen by |
225 * the system. | 225 * the system. |
226 */ | 226 */ |
227 external static Future<RawServerSocket> bind(address, | 227 external static Future<RawServerSocket> bind(address, |
228 int port, | 228 int port, |
229 {int backlog: 0, | 229 {int backlog: 0, |
230 bool v6Only: false}); | 230 bool v6Only: false, |
| 231 bool shared: false}); |
231 | 232 |
232 /** | 233 /** |
233 * Returns the port used by this socket. | 234 * Returns the port used by this socket. |
234 */ | 235 */ |
235 int get port; | 236 int get port; |
236 | 237 |
237 /** | 238 /** |
238 * Returns the address used by this socket. | 239 * Returns the address used by this socket. |
239 */ | 240 */ |
240 InternetAddress get address; | 241 InternetAddress get address; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 * [port] getter. | 312 * [port] getter. |
312 * | 313 * |
313 * The optional argument [backlog] can be used to specify the listen | 314 * The optional argument [backlog] can be used to specify the listen |
314 * backlog for the underlying OS listen setup. If [backlog] has the | 315 * backlog for the underlying OS listen setup. If [backlog] has the |
315 * value of [:0:] (the default) a reasonable value will be chosen by | 316 * value of [:0:] (the default) a reasonable value will be chosen by |
316 * the system. | 317 * the system. |
317 */ | 318 */ |
318 external static Future<ServerSocket> bind(address, | 319 external static Future<ServerSocket> bind(address, |
319 int port, | 320 int port, |
320 {int backlog: 0, | 321 {int backlog: 0, |
321 bool v6Only: false}); | 322 bool v6Only: false, |
| 323 bool shared: false}); |
322 | 324 |
323 /** | 325 /** |
324 * Returns the port used by this socket. | 326 * Returns the port used by this socket. |
325 */ | 327 */ |
326 int get port; | 328 int get port; |
327 | 329 |
328 /** | 330 /** |
329 * Returns the address used by this socket. | 331 * Returns the address used by this socket. |
330 */ | 332 */ |
331 InternetAddress get address; | 333 InternetAddress get address; |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 } | 752 } |
751 if (address != null) { | 753 if (address != null) { |
752 sb.write(", address = ${address.host}"); | 754 sb.write(", address = ${address.host}"); |
753 } | 755 } |
754 if (port != null) { | 756 if (port != null) { |
755 sb.write(", port = $port"); | 757 sb.write(", port = $port"); |
756 } | 758 } |
757 return sb.toString(); | 759 return sb.toString(); |
758 } | 760 } |
759 } | 761 } |
OLD | NEW |