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

Side by Side Diff: chrome/common/extensions/api/experimental_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: Add error if trying to bind TCP socket, remove TCP client socket bind. 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
(Empty)
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
3 // found in the LICENSE file.
4
5 namespace experimental.socket {
miket_OOO 2012/09/24 18:14:21 Please take a look at "[extensions-team] Mixing st
justinlin 2012/09/26 08:59:59 Done.
6
7 dictionary AcceptInfo {
8 // The id of the accepted socket.
9 long socketId;
10 long resultCode;
11 };
12
13 callback ListenCallback = void (long result);
14
15 callback AcceptCallback = void (AcceptInfo acceptInfo);
16
17 interface Functions {
18 // This method applies to TCP sockets only.
19 // Listens for connections on the specified port that this socket was bound
20 // to. This effectively makes this a server socket and client socket
21 // functions (connect, read, write) can no longer be used on this socket.
22 // |socketId| : The socketId.
23 // |address| : The address of the local machine.
24 // |port| : The port of the local machine.
25 // |backlog| : Length of the socket's accept queue.
26 static void listen(long socketId,
27 DOMString address,
28 long port,
29 long backlog,
30 ListenCallback callback);
31
32 // This method applies to TCP sockets only.
33 // Starts waiting for connections on the listening server socket.
34 // |socketId| : The socketId.
35 // |callback| : The callback is invoked when a new socket is accepted.
36 static void accept(long socketId,
37 AcceptCallback callback);
38 };
39
40 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698