| 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 */ | 402 */ |
| 403 InternetAddress get address; | 403 InternetAddress get address; |
| 404 | 404 |
| 405 /** | 405 /** |
| 406 * Returns the remote host connected to by this socket. | 406 * Returns the remote host connected to by this socket. |
| 407 */ | 407 */ |
| 408 String get remoteHost; | 408 String get remoteHost; |
| 409 } | 409 } |
| 410 | 410 |
| 411 | 411 |
| 412 class SocketIOException implements Exception { | 412 class SocketException implements IOException { |
| 413 const SocketIOException([String this.message = "", | 413 const SocketException([String this.message = "", |
| 414 OSError this.osError = null]); | 414 OSError this.osError = null]); |
| 415 String toString() { | 415 String toString() { |
| 416 StringBuffer sb = new StringBuffer(); | 416 StringBuffer sb = new StringBuffer(); |
| 417 sb.write("SocketIOException"); | 417 sb.write("SocketException"); |
| 418 if (!message.isEmpty) { | 418 if (!message.isEmpty) { |
| 419 sb.write(": $message"); | 419 sb.write(": $message"); |
| 420 if (osError != null) { | 420 if (osError != null) { |
| 421 sb.write(" ($osError)"); | 421 sb.write(" ($osError)"); |
| 422 } | 422 } |
| 423 } else if (osError != null) { | 423 } else if (osError != null) { |
| 424 sb.write(": $osError"); | 424 sb.write(": $osError"); |
| 425 } | 425 } |
| 426 return sb.toString(); | 426 return sb.toString(); |
| 427 } | 427 } |
| 428 final String message; | 428 final String message; |
| 429 final OSError osError; | 429 final OSError osError; |
| 430 } | 430 } |
| OLD | NEW |