| 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 namespace socket { | 5 namespace socket { |
| 6 enum SocketType { | 6 enum SocketType { |
| 7 tcp, | 7 tcp, |
| 8 udp | 8 udp |
| 9 }; | 9 }; |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // and <code>write()</code> calls. | 125 // and <code>write()</code> calls. |
| 126 // |socketId| : The socketId. | 126 // |socketId| : The socketId. |
| 127 // |hostname| : The hostname or IP address of the remote machine. | 127 // |hostname| : The hostname or IP address of the remote machine. |
| 128 // |port| : The port of the remote machine. | 128 // |port| : The port of the remote machine. |
| 129 // |callback| : Called when the connection attempt is complete. | 129 // |callback| : Called when the connection attempt is complete. |
| 130 static void connect(long socketId, | 130 static void connect(long socketId, |
| 131 DOMString hostname, | 131 DOMString hostname, |
| 132 long port, | 132 long port, |
| 133 ConnectCallback callback); | 133 ConnectCallback callback); |
| 134 | 134 |
| 135 // Binds the local address for socket. Currently, it does not support | 135 // Binds the local address for socket. |
| 136 // TCP socket. | |
| 137 // |socketId| : The socketId. | 136 // |socketId| : The socketId. |
| 138 // |address| : The address of the local machine. | 137 // |address| : The address of the local machine. |
| 139 // |port| : The port of the local machine. | 138 // |port| : The port of the local machine. |
| 140 // |callback| : Called when the bind attempt is complete. | 139 // |callback| : Called when the bind attempt is complete. |
| 141 static void bind(long socketId, | 140 static void bind(long socketId, |
| 142 DOMString address, | 141 DOMString address, |
| 143 long port, | 142 long port, |
| 144 BindCallback callback); | 143 BindCallback callback); |
| 145 | 144 |
| 146 // Disconnects the socket. For UDP sockets, <code>disconnect</code> is a | 145 // Disconnects the socket. For UDP sockets, <code>disconnect</code> is a |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 // |callback| : Called when the state is available. | 211 // |callback| : Called when the state is available. |
| 213 static void getInfo(long socketId, | 212 static void getInfo(long socketId, |
| 214 GetInfoCallback callback); | 213 GetInfoCallback callback); |
| 215 | 214 |
| 216 // Retrieves information about local adapters on this system. | 215 // Retrieves information about local adapters on this system. |
| 217 // |callback| : Called when local adapter information is available. | 216 // |callback| : Called when local adapter information is available. |
| 218 static void getNetworkList(GetNetworkCallback callback); | 217 static void getNetworkList(GetNetworkCallback callback); |
| 219 }; | 218 }; |
| 220 | 219 |
| 221 }; | 220 }; |
| OLD | NEW |