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

Unified 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: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/socket.idl
diff --git a/chrome/common/extensions/api/socket.idl b/chrome/common/extensions/api/socket.idl
index 95bf7cbbf464dd5bd5481aba96014bbf12a89ef0..3e5e9ad54f89232d4b56dc740c319c0061f524f1 100644
--- a/chrome/common/extensions/api/socket.idl
+++ b/chrome/common/extensions/api/socket.idl
@@ -19,12 +19,19 @@ namespace socket {
long socketId;
};
+ dictionary AcceptInfo {
+ long result;
+ long socketId;
+ };
+
callback CreateCallback = void (CreateInfo createInfo);
callback ConnectCallback = void (long result);
callback BindCallback = void (long result);
+ callback AcceptCallback = void (AcceptInfo acceptInfo);
+
dictionary ReadInfo {
// The resultCode returned from the underlying read() call.
long resultCode;
@@ -134,6 +141,12 @@ namespace socket {
long port,
BindCallback callback);
+ static void listen(long socketId,
+ long backlog);
Peng 2012/08/18 12:17:12 No callback?
justinlin 2012/09/11 04:32:32 Done.
+
+ static void accept(long socketId,
+ AcceptCallback callback);
+
// Disconnects the socket. For UDP sockets, <code>disconnect</code> is a
// non-operation but is safe to call.
// |socketId| : The socketId.

Powered by Google App Engine
This is Rietveld 408576698