| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 46    * [address] must be given as a numeric address, not a host name. | 46    * [address] must be given as a numeric address, not a host name. | 
| 47    * | 47    * | 
| 48    * To request or require that clients authenticate by providing an SSL (TLS) | 48    * To request or require that clients authenticate by providing an SSL (TLS) | 
| 49    * client certificate, set the optional parameter [requestClientCertificate] | 49    * client certificate, set the optional parameter [requestClientCertificate] | 
| 50    * or [requireClientCertificate] to true.  Requiring a certificate implies | 50    * or [requireClientCertificate] to true.  Requiring a certificate implies | 
| 51    * requesting a certificate, so setting both is redundant. | 51    * requesting a certificate, so setting both is redundant. | 
| 52    * To check whether a client certificate was received, check | 52    * To check whether a client certificate was received, check | 
| 53    * SecureSocket.peerCertificate after connecting.  If no certificate | 53    * SecureSocket.peerCertificate after connecting.  If no certificate | 
| 54    * was received, the result will be null. | 54    * was received, the result will be null. | 
| 55    * | 55    * | 
|  | 56    * [supportedProtocols] is an optional list of protocols (in decreasing | 
|  | 57    * order of preference) to use during the ALPN protocol negogiation with | 
|  | 58    * clients.  Example values are "http/1.1" or "h2".  The selected protocol | 
|  | 59    * can be obtained via [SecureSocket.selectedProtocol]. | 
|  | 60    * | 
| 56    * The optional argument [shared] specifies whether additional | 61    * The optional argument [shared] specifies whether additional | 
| 57    * SecureServerSocket objects can bind to the same combination of `address`, | 62    * SecureServerSocket objects can bind to the same combination of `address`, | 
| 58    * `port` and `v6Only`.  If `shared` is `true` and more `SecureServerSocket`s | 63    * `port` and `v6Only`.  If `shared` is `true` and more `SecureServerSocket`s | 
| 59    * from this isolate or other isolates are bound to the port, then the | 64    * from this isolate or other isolates are bound to the port, then the | 
| 60    * incoming connections will be distributed among all the bound | 65    * incoming connections will be distributed among all the bound | 
| 61    * `SecureServerSocket`s. Connections can be distributed over multiple | 66    * `SecureServerSocket`s. Connections can be distributed over multiple | 
| 62    * isolates this way. | 67    * isolates this way. | 
| 63    */ | 68    */ | 
| 64   static Future<SecureServerSocket> bind( | 69   static Future<SecureServerSocket> bind( | 
| 65       address, int port, SecurityContext context, | 70       address, int port, SecurityContext context, | 
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 170    * | 175    * | 
| 171    * [address] must be given as a numeric address, not a host name. | 176    * [address] must be given as a numeric address, not a host name. | 
| 172    * | 177    * | 
| 173    * To request or require that clients authenticate by providing an SSL (TLS) | 178    * To request or require that clients authenticate by providing an SSL (TLS) | 
| 174    * client certificate, set the optional parameters requestClientCertificate or | 179    * client certificate, set the optional parameters requestClientCertificate or | 
| 175    * requireClientCertificate to true.  Require implies request, so one doesn't | 180    * requireClientCertificate to true.  Require implies request, so one doesn't | 
| 176    * need to specify both.  To check whether a client certificate was received, | 181    * need to specify both.  To check whether a client certificate was received, | 
| 177    * check SecureSocket.peerCertificate after connecting.  If no certificate | 182    * check SecureSocket.peerCertificate after connecting.  If no certificate | 
| 178    * was received, the result will be null. | 183    * was received, the result will be null. | 
| 179    * | 184    * | 
|  | 185    * [supportedProtocols] is an optional list of protocols (in decreasing | 
|  | 186    * order of preference) to use during the ALPN protocol negogiation with | 
|  | 187    * clients.  Example values are "http/1.1" or "h2".  The selected protocol | 
|  | 188    * can be obtained via [RawSecureSocket.selectedProtocol]. | 
|  | 189    * | 
| 180    * The optional argument [shared] specifies whether additional | 190    * The optional argument [shared] specifies whether additional | 
| 181    * RawSecureServerSocket objects can bind to the same combination of | 191    * RawSecureServerSocket objects can bind to the same combination of | 
| 182    * `address`, `port` and `v6Only`.  If `shared` is `true` and more | 192    * `address`, `port` and `v6Only`.  If `shared` is `true` and more | 
| 183    * `RawSecureServerSocket`s from this isolate or other isolates are bound to | 193    * `RawSecureServerSocket`s from this isolate or other isolates are bound to | 
| 184    * the port, then the incoming connections will be distributed among all the | 194    * the port, then the incoming connections will be distributed among all the | 
| 185    * bound `RawSecureServerSocket`s. Connections can be distributed over | 195    * bound `RawSecureServerSocket`s. Connections can be distributed over | 
| 186    * multiple isolates this way. | 196    * multiple isolates this way. | 
| 187    */ | 197    */ | 
| 188   static Future<RawSecureServerSocket> bind( | 198   static Future<RawSecureServerSocket> bind( | 
| 189       address, int port, SecurityContext context, | 199       address, int port, SecurityContext context, | 
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 272           onError: _controller.addError, onDone: _controller.close); | 282           onError: _controller.addError, onDone: _controller.close); | 
| 273     } else { | 283     } else { | 
| 274       close(); | 284       close(); | 
| 275     } | 285     } | 
| 276   } | 286   } | 
| 277 | 287 | 
| 278   void set _owner(owner) { | 288   void set _owner(owner) { | 
| 279     (_socket as dynamic)._owner = owner; | 289     (_socket as dynamic)._owner = owner; | 
| 280   } | 290   } | 
| 281 } | 291 } | 
| OLD | NEW | 
|---|