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 * [InternetAddressType] is the type an [InternetAddress]. Currently, | 8 * [InternetAddressType] is the type an [InternetAddress]. Currently, |
9 * IP version 4 (IPv4) and IP version 6 (IPv6) are supported. | 9 * IP version 4 (IPv4) and IP version 6 (IPv6) are supported. |
10 */ | 10 */ |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 | 347 |
348 /** | 348 /** |
349 * The [SocketOption] is used as a parameter to [Socket.setOption] and | 349 * The [SocketOption] is used as a parameter to [Socket.setOption] and |
350 * [RawSocket.setOption] to set customize the behaviour of the underlying | 350 * [RawSocket.setOption] to set customize the behaviour of the underlying |
351 * socket. | 351 * socket. |
352 */ | 352 */ |
353 class SocketOption { | 353 class SocketOption { |
354 /** | 354 /** |
355 * Enable or disable no-delay on the socket. If TCP_NODELAY is enabled, the | 355 * Enable or disable no-delay on the socket. If TCP_NODELAY is enabled, the |
356 * socket will not buffer data internally, but instead write each data chunk | 356 * socket will not buffer data internally, but instead write each data chunk |
357 * as an invidual TCP packet. | 357 * as an individual TCP packet. |
358 * | 358 * |
359 * TCP_NODELAY is disabled by default. | 359 * TCP_NODELAY is disabled by default. |
360 */ | 360 */ |
361 static const SocketOption TCP_NODELAY = const SocketOption._(0); | 361 static const SocketOption TCP_NODELAY = const SocketOption._(0); |
362 | 362 |
363 static const SocketOption _IP_MULTICAST_LOOP = const SocketOption._(1); | 363 static const SocketOption _IP_MULTICAST_LOOP = const SocketOption._(1); |
364 static const SocketOption _IP_MULTICAST_HOPS = const SocketOption._(2); | 364 static const SocketOption _IP_MULTICAST_HOPS = const SocketOption._(2); |
365 static const SocketOption _IP_MULTICAST_IF = const SocketOption._(3); | 365 static const SocketOption _IP_MULTICAST_IF = const SocketOption._(3); |
366 static const SocketOption _IP_BROADCAST = const SocketOption._(4); | 366 static const SocketOption _IP_BROADCAST = const SocketOption._(4); |
367 final _value; | 367 final _value; |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 } | 738 } |
739 if (address != null) { | 739 if (address != null) { |
740 sb.write(", address = ${address.host}"); | 740 sb.write(", address = ${address.host}"); |
741 } | 741 } |
742 if (port != null) { | 742 if (port != null) { |
743 sb.write(", port = $port"); | 743 sb.write(", port = $port"); |
744 } | 744 } |
745 return sb.toString(); | 745 return sb.toString(); |
746 } | 746 } |
747 } | 747 } |
OLD | NEW |