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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 * available for immediate reading. If no data is available [null] | 338 * available for immediate reading. If no data is available [null] |
339 * is returned. | 339 * is returned. |
340 */ | 340 */ |
341 List<int> read([int len]); | 341 List<int> read([int len]); |
342 | 342 |
343 /** | 343 /** |
344 * Writes up to [count] bytes of the buffer from [offset] buffer offset to | 344 * Writes up to [count] bytes of the buffer from [offset] buffer offset to |
345 * the socket. The number of successfully written bytes is returned. This | 345 * the socket. The number of successfully written bytes is returned. This |
346 * function is non-blocking and will only write data if buffer space is | 346 * function is non-blocking and will only write data if buffer space is |
347 * available in the socket. | 347 * available in the socket. |
| 348 * |
| 349 * The default value for [offset] is 0, and the default value for [count] is |
| 350 * [:buffer.length - offset:]. |
348 */ | 351 */ |
349 int write(List<int> buffer, [int offset, int count]); | 352 int write(List<int> buffer, [int offset, int count]); |
350 | 353 |
351 /** | 354 /** |
352 * Returns the port used by this socket. | 355 * Returns the port used by this socket. |
353 */ | 356 */ |
354 int get port; | 357 int get port; |
355 | 358 |
356 /** | 359 /** |
357 * Returns the remote port connected to by this socket. | 360 * Returns the remote port connected to by this socket. |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 sb.write(" ($osError)"); | 478 sb.write(" ($osError)"); |
476 } | 479 } |
477 } else if (osError != null) { | 480 } else if (osError != null) { |
478 sb.write(": $osError"); | 481 sb.write(": $osError"); |
479 } | 482 } |
480 return sb.toString(); | 483 return sb.toString(); |
481 } | 484 } |
482 final String message; | 485 final String message; |
483 final OSError osError; | 486 final OSError osError; |
484 } | 487 } |
OLD | NEW |