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.sockets.tcp</code> API to send and receive data over the | 5 // Use the <code>chrome.sockets.tcp</code> API to send and receive data over the |
6 // network using TCP connections. This API supersedes the TCP functionality | 6 // network using TCP connections. This API supersedes the TCP functionality |
7 // previously found in the <code>chrome.socket</code> API. | 7 // previously found in the <code>chrome.socket</code> API. |
8 namespace sockets.tcp { | 8 namespace sockets.tcp { |
9 // The socket properties specified in the <code>create</code> or | 9 // The socket properties specified in the <code>create</code> or |
10 // <code>update</code> function. Each property is optional. If a property | 10 // <code>update</code> function. Each property is optional. If a property |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // A negative value indicates an error. | 75 // A negative value indicates an error. |
76 callback SetKeepAliveCallback = void (long result); | 76 callback SetKeepAliveCallback = void (long result); |
77 | 77 |
78 // Callback from the <code>setNodeDelay</code> method. | 78 // Callback from the <code>setNodeDelay</code> method. |
79 // |result| : The result code returned from the underlying network call. | 79 // |result| : The result code returned from the underlying network call. |
80 // A negative value indicates an error. | 80 // A negative value indicates an error. |
81 callback SetNoDelayCallback = void (long result); | 81 callback SetNoDelayCallback = void (long result); |
82 | 82 |
83 dictionary TLSVersionConstraints { | 83 dictionary TLSVersionConstraints { |
84 // The minimum and maximum acceptable versions of TLS. These will | 84 // The minimum and maximum acceptable versions of TLS. These will |
85 // be <code>ssl3</code>, <code>tls1</code>, <code>tls1.1</code>, | 85 // be <code>tls1</code>, <code>tls1.1</code>, or <code>tls1.2</code>. |
86 // or <code>tls1.2</code>. | |
87 DOMString? min; | 86 DOMString? min; |
88 DOMString? max; | 87 DOMString? max; |
89 }; | 88 }; |
90 | 89 |
91 dictionary SecureOptions { | 90 dictionary SecureOptions { |
92 TLSVersionConstraints? tlsVersion; | 91 TLSVersionConstraints? tlsVersion; |
93 }; | 92 }; |
94 | 93 |
95 callback SecureCallback = void (long result); | 94 callback SecureCallback = void (long result); |
96 | 95 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 static void onReceive(ReceiveInfo info); | 264 static void onReceive(ReceiveInfo info); |
266 | 265 |
267 // Event raised when a network error occured while the runtime was waiting | 266 // Event raised when a network error occured while the runtime was waiting |
268 // for data on the socket address and port. Once this event is raised, the | 267 // for data on the socket address and port. Once this event is raised, the |
269 // socket is set to <code>paused</code> and no more <code>onReceive</code> | 268 // socket is set to <code>paused</code> and no more <code>onReceive</code> |
270 // events are raised for this socket. | 269 // events are raised for this socket. |
271 // |info| : The event data. | 270 // |info| : The event data. |
272 static void onReceiveError(ReceiveErrorInfo info); | 271 static void onReceiveError(ReceiveErrorInfo info); |
273 }; | 272 }; |
274 }; | 273 }; |
OLD | NEW |