| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Use the <code>chrome.socket</code> API to send and receive data over the | 5 // Use the <code>chrome.socket</code> API to send and receive data over the |
| 6 // network using TCP and UDP connections. <b>Note:</b> Starting with Chrome 33, | 6 // network using TCP and UDP connections. <b>Note:</b> Starting with Chrome 33, |
| 7 // this API is deprecated in favor of the $(ref:sockets.udp), $(ref:sockets.tcp)
and | 7 // this API is deprecated in favor of the $(ref:sockets.udp), $(ref:sockets.tcp)
and |
| 8 // $(ref:sockets.tcpServer) APIs. | 8 // $(ref:sockets.tcpServer) APIs. |
| 9 namespace socket { | 9 namespace socket { |
| 10 enum SocketType { | 10 enum SocketType { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 // The available IPv4/6 address. | 107 // The available IPv4/6 address. |
| 108 DOMString address; | 108 DOMString address; |
| 109 | 109 |
| 110 // The prefix length | 110 // The prefix length |
| 111 long prefixLength; | 111 long prefixLength; |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 dictionary TLSVersionConstraints { | 114 dictionary TLSVersionConstraints { |
| 115 // The minimum and maximum acceptable versions of TLS. These will | 115 // The minimum and maximum acceptable versions of TLS. These will |
| 116 // be <code>ssl3</code>, <code>tls1</code>, <code>tls1.1</code>, | 116 // be <code>tls1</code>, <code>tls1.1</code>, or <code>tls1.2</code>. |
| 117 // or <code>tls1.2</code>. | |
| 118 DOMString? min; | 117 DOMString? min; |
| 119 DOMString? max; | 118 DOMString? max; |
| 120 }; | 119 }; |
| 121 | 120 |
| 122 dictionary SecureOptions { | 121 dictionary SecureOptions { |
| 123 TLSVersionConstraints? tlsVersion; | 122 TLSVersionConstraints? tlsVersion; |
| 124 }; | 123 }; |
| 125 | 124 |
| 126 callback RecvFromCallback = void (RecvFromInfo recvFromInfo); | 125 callback RecvFromCallback = void (RecvFromInfo recvFromInfo); |
| 127 | 126 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 // Start a TLS client connection over a connected TCP client socket. | 351 // Start a TLS client connection over a connected TCP client socket. |
| 353 // |socketId| : The connected socket to use. | 352 // |socketId| : The connected socket to use. |
| 354 // |options| : Constraints and parameters for the TLS connection. | 353 // |options| : Constraints and parameters for the TLS connection. |
| 355 // |callback| : Called when the TLS connection attempt is complete. | 354 // |callback| : Called when the TLS connection attempt is complete. |
| 356 static void secure(long socketId, | 355 static void secure(long socketId, |
| 357 optional SecureOptions options, | 356 optional SecureOptions options, |
| 358 SecureCallback callback); | 357 SecureCallback callback); |
| 359 }; | 358 }; |
| 360 | 359 |
| 361 }; | 360 }; |
| OLD | NEW |