| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 * name. Otherwise, it is looked up as a nickname. | 172 * name. Otherwise, it is looked up as a nickname. |
| 173 * | 173 * |
| 174 * To request or require that clients authenticate by providing an SSL (TLS) | 174 * To request or require that clients authenticate by providing an SSL (TLS) |
| 175 * client certificate, set the optional parameters requestClientCertificate or | 175 * client certificate, set the optional parameters requestClientCertificate or |
| 176 * requireClientCertificate to true. Require implies request, so one doesn't | 176 * requireClientCertificate to true. Require implies request, so one doesn't |
| 177 * need to specify both. To check whether a client certificate was received, | 177 * need to specify both. To check whether a client certificate was received, |
| 178 * check SecureSocket.peerCertificate after connecting. If no certificate | 178 * check SecureSocket.peerCertificate after connecting. If no certificate |
| 179 * was received, the result will be null. | 179 * was received, the result will be null. |
| 180 */ | 180 */ |
| 181 static Future<RawSecureServerSocket> bind( | 181 static Future<RawSecureServerSocket> bind( |
| 182 String address, | 182 address, |
| 183 int port, | 183 int port, |
| 184 String certificateName, | 184 String certificateName, |
| 185 {int backlog: 0, | 185 {int backlog: 0, |
| 186 bool v6Only: false, | 186 bool v6Only: false, |
| 187 bool requestClientCertificate: false, | 187 bool requestClientCertificate: false, |
| 188 bool requireClientCertificate: false}) { | 188 bool requireClientCertificate: false}) { |
| 189 return RawServerSocket.bind(address, port, backlog: backlog, v6Only: v6Only) | 189 return RawServerSocket.bind(address, port, backlog: backlog, v6Only: v6Only) |
| 190 .then((serverSocket) => new RawSecureServerSocket._( | 190 .then((serverSocket) => new RawSecureServerSocket._( |
| 191 serverSocket, | 191 serverSocket, |
| 192 certificateName, | 192 certificateName, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 _subscription = _socket.listen(_onData, | 274 _subscription = _socket.listen(_onData, |
| 275 onDone: _onDone, | 275 onDone: _onDone, |
| 276 onError: _onError); | 276 onError: _onError); |
| 277 } else { | 277 } else { |
| 278 close(); | 278 close(); |
| 279 } | 279 } |
| 280 } | 280 } |
| 281 } | 281 } |
| 282 | 282 |
| 283 | 283 |
| OLD | NEW |