| 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.udp</code> API to send and receive data over the | 5 // Use the <code>chrome.sockets.udp</code> API to send and receive data over the |
| 6 // network using UDP connections. This API supersedes the UDP functionality | 6 // network using UDP connections. This API supersedes the UDP functionality |
| 7 // previously found in the "socket" API. | 7 // previously found in the "socket" API. |
| 8 namespace sockets.udp { | 8 [use_movable_types=true] namespace sockets.udp { |
| 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 |
| 11 // value is not specified, a default value is used when calling | 11 // value is not specified, a default value is used when calling |
| 12 // <code>create</code>, or the existing value if preserved when calling | 12 // <code>create</code>, or the existing value if preserved when calling |
| 13 // <code>update</code>. | 13 // <code>update</code>. |
| 14 dictionary SocketProperties { | 14 dictionary SocketProperties { |
| 15 // Flag indicating if the socket is left open when the event page of the | 15 // Flag indicating if the socket is left open when the event page of the |
| 16 // application is unloaded (see | 16 // application is unloaded (see |
| 17 // <a href="http://developer.chrome.com/apps/app_lifecycle.html">Manage App | 17 // <a href="http://developer.chrome.com/apps/app_lifecycle.html">Manage App |
| 18 // Lifecycle</a>). The default value is "false." When the application is | 18 // Lifecycle</a>). The default value is "false." When the application is |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 static void onReceive(ReceiveInfo info); | 312 static void onReceive(ReceiveInfo info); |
| 313 | 313 |
| 314 // Event raised when a network error occured while the runtime was waiting | 314 // Event raised when a network error occured while the runtime was waiting |
| 315 // for data on the socket address and port. Once this event is raised, the | 315 // for data on the socket address and port. Once this event is raised, the |
| 316 // socket is paused and no more <code>onReceive</code> events will be raised | 316 // socket is paused and no more <code>onReceive</code> events will be raised |
| 317 // for this socket until the socket is resumed. | 317 // for this socket until the socket is resumed. |
| 318 // |info| : The event data. | 318 // |info| : The event data. |
| 319 static void onReceiveError(ReceiveErrorInfo info); | 319 static void onReceiveError(ReceiveErrorInfo info); |
| 320 }; | 320 }; |
| 321 }; | 321 }; |
| OLD | NEW |