| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 interface ServerSocket factory _ServerSocket { | 5 interface ServerSocket factory _ServerSocket { |
| 6 /* | 6 /* |
| 7 * Constructs a new server socket, binds it to a given address and port, | 7 * Constructs a new server socket, binds it to a given address and port, |
| 8 * and listens on it. | 8 * and listens on it. |
| 9 */ | 9 */ |
| 10 ServerSocket(String bindAddress, int port, int backlog); | 10 ServerSocket(String bindAddress, int port, int backlog); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 * Returns output stream of the socket. | 103 * Returns output stream of the socket. |
| 104 */ | 104 */ |
| 105 OutputStream get outputStream(); | 105 OutputStream get outputStream(); |
| 106 | 106 |
| 107 /* | 107 /* |
| 108 * Returns the port used by this socket. | 108 * Returns the port used by this socket. |
| 109 */ | 109 */ |
| 110 int get port(); | 110 int get port(); |
| 111 | 111 |
| 112 /* | 112 /* |
| 113 * Closes the socket | 113 * Closes the socket. Calling [close] will never throw an exception |
| 114 * and calling it several times is supported. |
| 114 */ | 115 */ |
| 115 void close(); | 116 void close(); |
| 116 } | 117 } |
| 117 | 118 |
| 118 | 119 |
| 119 class SocketIOException implements Exception { | 120 class SocketIOException implements Exception { |
| 120 const SocketIOException([String this.message = ""]); | 121 const SocketIOException([String this.message = ""]); |
| 121 String toString() => "SocketIOException: $message"; | 122 String toString() => "SocketIOException: $message"; |
| 122 | 123 |
| 123 /* | 124 /* |
| 124 * Contains the exception message. | 125 * Contains the exception message. |
| 125 */ | 126 */ |
| 126 final String message; | 127 final String message; |
| 127 } | 128 } |
| OLD | NEW |