| 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 part of dart.io; | 5 part of dart.io; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * The [SecureServerSocket] is a server socket, providing a stream of high-level | 8 * The [SecureServerSocket] is a server socket, providing a stream of high-level |
| 9 * [Socket]s. | 9 * [Socket]s. |
| 10 * | 10 * |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 onDone: onDone, | 203 onDone: onDone, |
| 204 cancelOnError: cancelOnError); | 204 cancelOnError: cancelOnError); |
| 205 } | 205 } |
| 206 | 206 |
| 207 /** | 207 /** |
| 208 * Returns the port used by this socket. | 208 * Returns the port used by this socket. |
| 209 */ | 209 */ |
| 210 int get port => _socket.port; | 210 int get port => _socket.port; |
| 211 | 211 |
| 212 /** | 212 /** |
| 213 * Returns the address used by this socket. |
| 214 */ |
| 215 InternetAddress get address => _socket.address; |
| 216 |
| 217 /** |
| 213 * Closes the socket. The returned future completes when the socket | 218 * Closes the socket. The returned future completes when the socket |
| 214 * is fully closed and is no longer bound. | 219 * is fully closed and is no longer bound. |
| 215 */ | 220 */ |
| 216 Future<RawSecureServerSocket> close() { | 221 Future<RawSecureServerSocket> close() { |
| 217 _closed = true; | 222 _closed = true; |
| 218 return _socket.close().then((_) => this); | 223 return _socket.close().then((_) => this); |
| 219 } | 224 } |
| 220 | 225 |
| 221 void _onData(RawSocket connection) { | 226 void _onData(RawSocket connection) { |
| 222 var remotePort; | 227 var remotePort; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 _subscription = _socket.listen(_onData, | 274 _subscription = _socket.listen(_onData, |
| 270 onDone: _onDone, | 275 onDone: _onDone, |
| 271 onError: _onError); | 276 onError: _onError); |
| 272 } else { | 277 } else { |
| 273 close(); | 278 close(); |
| 274 } | 279 } |
| 275 } | 280 } |
| 276 } | 281 } |
| 277 | 282 |
| 278 | 283 |
| OLD | NEW |