| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 default _ServerSocket { | 5 interface ServerSocket default _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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 * Returns the port used by this socket. | 105 * Returns the port used by this socket. |
| 106 */ | 106 */ |
| 107 int get port(); | 107 int get port(); |
| 108 | 108 |
| 109 /** | 109 /** |
| 110 * Returns the remote port connected to by this socket. | 110 * Returns the remote port connected to by this socket. |
| 111 */ | 111 */ |
| 112 int get remotePort(); | 112 int get remotePort(); |
| 113 | 113 |
| 114 /** | 114 /** |
| 115 * Returns the remote host connected to by this socket. |
| 116 */ |
| 117 String get remoteHost(); |
| 118 |
| 119 /** |
| 115 * Closes the socket. Calling [close] will never throw an exception | 120 * Closes the socket. Calling [close] will never throw an exception |
| 116 * and calling it several times is supported. If [halfClose] is true | 121 * and calling it several times is supported. If [halfClose] is true |
| 117 * the socket will only be closed for writing and it might still be | 122 * the socket will only be closed for writing and it might still be |
| 118 * possible to read data. Calling [close] will not trigger a call to | 123 * possible to read data. Calling [close] will not trigger a call to |
| 119 * [onClosed]. | 124 * [onClosed]. |
| 120 */ | 125 */ |
| 121 void close([bool halfClose]); | 126 void close([bool halfClose]); |
| 122 | 127 |
| 123 /** | 128 /** |
| 124 * Socket is hashable. | 129 * Socket is hashable. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 139 sb.add(" ($osError)"); | 144 sb.add(" ($osError)"); |
| 140 } | 145 } |
| 141 } else if (osError != null) { | 146 } else if (osError != null) { |
| 142 sb.add(": $osError"); | 147 sb.add(": $osError"); |
| 143 } | 148 } |
| 144 return sb.toString(); | 149 return sb.toString(); |
| 145 } | 150 } |
| 146 final String message; | 151 final String message; |
| 147 final OSError osError; | 152 final OSError osError; |
| 148 } | 153 } |
| OLD | NEW |