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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 * If [certificateName] contains "CN=", it is assumed to be a distinguished | 51 * If [certificateName] contains "CN=", it is assumed to be a distinguished |
52 * name. Otherwise, it is looked up as a nickname. | 52 * name. Otherwise, it is looked up as a nickname. |
53 * | 53 * |
54 * To request or require that clients authenticate by providing an SSL (TLS) | 54 * To request or require that clients authenticate by providing an SSL (TLS) |
55 * client certificate, set the optional parameter [requestClientCertificate] | 55 * client certificate, set the optional parameter [requestClientCertificate] |
56 * or [requireClientCertificate] to true. Requiring a certificate implies | 56 * or [requireClientCertificate] to true. Requiring a certificate implies |
57 * requesting a certificate, so one doesn't need to set both to true. | 57 * requesting a certificate, so one doesn't need to set both to true. |
58 * To check whether a client certificate was received, check | 58 * To check whether a client certificate was received, check |
59 * SecureSocket.peerCertificate after connecting. If no certificate | 59 * SecureSocket.peerCertificate after connecting. If no certificate |
60 * was received, the result will be null. | 60 * was received, the result will be null. |
61 * | |
62 * The optional argument [shared] specify whether additional binds | |
63 * to the same `address`, `port` and `v6Only` combination is | |
64 * possible from the same Dart process. If `shared` is `true` and | |
65 * additional binds are preformed, then the incoming (incoming) | |
66 * connections will be distributed between that set | |
67 * `SecureServerSocket`s. One way of using this is to have number of | |
68 * isolates between which incoming connections are distributed. | |
kustermann
2015/02/17 11:30:56
preformed -> performed
remove "(incoming)"
Søren Gjesse
2015/02/17 12:53:10
Done.
| |
61 */ | 69 */ |
62 static Future<SecureServerSocket> bind( | 70 static Future<SecureServerSocket> bind( |
63 address, | 71 address, |
64 int port, | 72 int port, |
65 String certificateName, | 73 String certificateName, |
66 {int backlog: 0, | 74 {int backlog: 0, |
67 bool v6Only: false, | 75 bool v6Only: false, |
68 bool requestClientCertificate: false, | 76 bool requestClientCertificate: false, |
69 bool requireClientCertificate: false, | 77 bool requireClientCertificate: false, |
70 List<String> supportedProtocols, | 78 List<String> supportedProtocols, |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
178 * NSS certificate database set by SecureSocket.setCertificateDatabase. | 186 * NSS certificate database set by SecureSocket.setCertificateDatabase. |
179 * If [certificateName] contains "CN=", it is assumed to be a distinguished | 187 * If [certificateName] contains "CN=", it is assumed to be a distinguished |
180 * name. Otherwise, it is looked up as a nickname. | 188 * name. Otherwise, it is looked up as a nickname. |
181 * | 189 * |
182 * To request or require that clients authenticate by providing an SSL (TLS) | 190 * To request or require that clients authenticate by providing an SSL (TLS) |
183 * client certificate, set the optional parameters requestClientCertificate or | 191 * client certificate, set the optional parameters requestClientCertificate or |
184 * requireClientCertificate to true. Require implies request, so one doesn't | 192 * requireClientCertificate to true. Require implies request, so one doesn't |
185 * need to specify both. To check whether a client certificate was received, | 193 * need to specify both. To check whether a client certificate was received, |
186 * check SecureSocket.peerCertificate after connecting. If no certificate | 194 * check SecureSocket.peerCertificate after connecting. If no certificate |
187 * was received, the result will be null. | 195 * was received, the result will be null. |
196 * | |
197 * The optional argument [shared] specify whether additional binds | |
198 * to the same `address`, `port` and `v6Only` combination is | |
199 * possible from the same Dart process. If `shared` is `true` and | |
200 * additional binds are preformed, then the incoming (accepted) | |
201 * connections will be distributed between that set | |
202 * `RawSecureServerSocket`s. One way of using this is to have number | |
203 * of isolates between which incoming connections are distributed. | |
188 */ | 204 */ |
189 static Future<RawSecureServerSocket> bind( | 205 static Future<RawSecureServerSocket> bind( |
190 address, | 206 address, |
191 int port, | 207 int port, |
192 String certificateName, | 208 String certificateName, |
193 {int backlog: 0, | 209 {int backlog: 0, |
194 bool v6Only: false, | 210 bool v6Only: false, |
195 bool requestClientCertificate: false, | 211 bool requestClientCertificate: false, |
196 bool requireClientCertificate: false, | 212 bool requireClientCertificate: false, |
197 List<String> supportedProtocols, | 213 List<String> supportedProtocols, |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
289 onError: _onError); | 305 onError: _onError); |
290 } else { | 306 } else { |
291 close(); | 307 close(); |
292 } | 308 } |
293 } | 309 } |
294 | 310 |
295 void set _owner(owner) { (_socket as dynamic)._owner = owner; } | 311 void set _owner(owner) { (_socket as dynamic)._owner = owner; } |
296 } | 312 } |
297 | 313 |
298 | 314 |
OLD | NEW |