OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 static void onReceive(ReceiveInfo info); | 243 static void onReceive(ReceiveInfo info); |
244 | 244 |
245 // Event raised when a network error occured while the runtime was waiting | 245 // Event raised when a network error occured while the runtime was waiting |
246 // for data on the socket address and port. Once this event is raised, the | 246 // for data on the socket address and port. Once this event is raised, the |
247 // socket is set to <code>paused</code> and no more <code>onReceive</code> | 247 // socket is set to <code>paused</code> and no more <code>onReceive</code> |
248 // events are raised for this socket. | 248 // events are raised for this socket. |
249 // |info| : The event data. | 249 // |info| : The event data. |
250 static void onReceiveError(ReceiveErrorInfo info); | 250 static void onReceiveError(ReceiveErrorInfo info); |
251 }; | 251 }; |
252 }; | 252 }; |
OLD | NEW |