Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/common/extensions/api/socket.idl

Issue 10827390: Implement chrome.socket.bind/listen/accept for TCP server socket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert net::socket change, check permissions for listen. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698