Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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. | 6 // network using TCP and UDP connections. |
| 7 namespace socket { | 7 namespace socket { |
| 8 enum SocketType { | 8 enum SocketType { |
| 9 tcp, | 9 tcp, |
| 10 udp | 10 udp |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 // "eth0", "lo", etc. | 100 // "eth0", "lo", etc. |
| 101 DOMString name; | 101 DOMString name; |
| 102 | 102 |
| 103 // The available IPv4/6 address. | 103 // The available IPv4/6 address. |
| 104 DOMString address; | 104 DOMString address; |
| 105 | 105 |
| 106 // The prefix length | 106 // The prefix length |
| 107 long prefixLength; | 107 long prefixLength; |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 dictionary TLSVersionConstraints { | |
| 111 DOMString? min; | |
| 112 DOMString? max; | |
| 113 }; | |
| 114 | |
| 115 dictionary SecureOptions { | |
| 116 TLSVersionConstraints? tlsVersion; | |
| 117 }; | |
| 118 | |
| 110 callback RecvFromCallback = void (RecvFromInfo recvFromInfo); | 119 callback RecvFromCallback = void (RecvFromInfo recvFromInfo); |
| 111 | 120 |
| 112 callback SendToCallback = void (WriteInfo writeInfo); | 121 callback SendToCallback = void (WriteInfo writeInfo); |
| 113 | 122 |
| 114 callback SetKeepAliveCallback = void (boolean result); | 123 callback SetKeepAliveCallback = void (boolean result); |
| 115 | 124 |
| 116 callback SetNoDelayCallback = void (boolean result); | 125 callback SetNoDelayCallback = void (boolean result); |
| 117 | 126 |
| 118 callback GetInfoCallback = void (SocketInfo result); | 127 callback GetInfoCallback = void (SocketInfo result); |
| 119 | 128 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 325 static void setMulticastLoopbackMode( | 334 static void setMulticastLoopbackMode( |
| 326 long socketId, | 335 long socketId, |
| 327 boolean enabled, | 336 boolean enabled, |
| 328 SetMulticastLoopbackModeCallback callback); | 337 SetMulticastLoopbackModeCallback callback); |
| 329 | 338 |
| 330 // Get the multicast group addresses the socket is currently joined to. | 339 // Get the multicast group addresses the socket is currently joined to. |
| 331 // |socketId| : The socketId. | 340 // |socketId| : The socketId. |
| 332 // |callback| : Called with an array of strings of the result. | 341 // |callback| : Called with an array of strings of the result. |
| 333 static void getJoinedGroups(long socketId, | 342 static void getJoinedGroups(long socketId, |
| 334 GetJoinedGroupsCallback callback); | 343 GetJoinedGroupsCallback callback); |
| 344 | |
| 345 // Start a TLS client connection over the socket. | |
| 346 // |socketId| : The existing, connected socket to use. | |
| 347 // |options| : Constraints and parameters for the TLS connection. | |
| 348 // |callback| : Called when the connection attempt is complete. | |
| 349 static void secure(long socketId, | |
| 350 optional SecureOptions options, | |
| 351 ConnectCallback callback); | |
|
rpaquay
2013/12/09 23:02:03
I would create a "SecureCallback" (even though it
lally
2013/12/12 02:31:39
Done.
| |
| 335 }; | 352 }; |
| 336 | 353 |
| 337 }; | 354 }; |
| OLD | NEW |