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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 long? localPort; | 95 long? localPort; |
96 }; | 96 }; |
97 | 97 |
98 dictionary NetworkInterface { | 98 dictionary NetworkInterface { |
99 // The underlying name of the adapter. On *nix, this will typically be | 99 // The underlying name of the adapter. On *nix, this will typically be |
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 |
| 106 // The prefix length |
| 107 long prefixLength; |
105 }; | 108 }; |
106 | 109 |
107 callback RecvFromCallback = void (RecvFromInfo recvFromInfo); | 110 callback RecvFromCallback = void (RecvFromInfo recvFromInfo); |
108 | 111 |
109 callback SendToCallback = void (WriteInfo writeInfo); | 112 callback SendToCallback = void (WriteInfo writeInfo); |
110 | 113 |
111 callback SetKeepAliveCallback = void (boolean result); | 114 callback SetKeepAliveCallback = void (boolean result); |
112 | 115 |
113 callback SetNoDelayCallback = void (boolean result); | 116 callback SetNoDelayCallback = void (boolean result); |
114 | 117 |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 SetMulticastLoopbackModeCallback callback); | 328 SetMulticastLoopbackModeCallback callback); |
326 | 329 |
327 // Get the multicast group addresses the socket is currently joined to. | 330 // Get the multicast group addresses the socket is currently joined to. |
328 // |socketId| : The socketId. | 331 // |socketId| : The socketId. |
329 // |callback| : Called with an array of strings of the result. | 332 // |callback| : Called with an array of strings of the result. |
330 static void getJoinedGroups(long socketId, | 333 static void getJoinedGroups(long socketId, |
331 GetJoinedGroupsCallback callback); | 334 GetJoinedGroupsCallback callback); |
332 }; | 335 }; |
333 | 336 |
334 }; | 337 }; |
OLD | NEW |