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

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

Issue 10537017: Allow hostnames in socket.connect(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mihaip's comments + clang fix. Created 8 years, 6 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/extensions/api_test/dns/api/background.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // File-level comment to appease parser. Eventually this will not be necessary. 5 // File-level comment to appease parser. Eventually this will not be necessary.
6 6
7 [nodoc] namespace experimental.socket { 7 [nodoc] namespace experimental.socket {
8 enum SocketType { 8 enum SocketType {
9 tcp, 9 tcp,
10 udp 10 udp
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 static void create(SocketType type, 71 static void create(SocketType type,
72 optional CreateOptions options, 72 optional CreateOptions options,
73 CreateCallback callback); 73 CreateCallback callback);
74 74
75 // Destroys the socket. Each socket created should be destroyed after use. 75 // Destroys the socket. Each socket created should be destroyed after use.
76 // |socketId| : The socketId. 76 // |socketId| : The socketId.
77 static void destroy(long socketId); 77 static void destroy(long socketId);
78 78
79 // Connects the socket to the remote machine. 79 // Connects the socket to the remote machine.
80 // |socketId| : The socketId. 80 // |socketId| : The socketId.
81 // |address| : The address of the remote machine. 81 // |hostname| : The hostname or IP address of the remote machine.
82 // |port| : The port of the remote machine. 82 // |port| : The port of the remote machine.
83 // |callback| : Called when the connection attempt is complete. 83 // |callback| : Called when the connection attempt is complete.
84 static void connect(long socketId, 84 static void connect(long socketId,
85 DOMString address, 85 DOMString hostname,
86 long port, 86 long port,
87 ConnectCallback callback); 87 ConnectCallback callback);
88 88
89 // Binds the local address for socket. Currently, it does not support 89 // Binds the local address for socket. Currently, it does not support
90 // TCP socket. 90 // TCP socket.
91 // |socketId| : The socketId. 91 // |socketId| : The socketId.
92 // |address| : The address of the local machine. 92 // |address| : The address of the local machine.
93 // |port| : The port of the local machine. 93 // |port| : The port of the local machine.
94 // |callback| : Called when the bind attempt is complete. 94 // |callback| : Called when the bind attempt is complete.
95 static void bind(long socketId, 95 static void bind(long socketId,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // Enable/disable Nagle algorithm. 160 // Enable/disable Nagle algorithm.
161 // |socketId| : The socketId. 161 // |socketId| : The socketId.
162 // |noDelay| : If true, disable Nagle algorithm. 162 // |noDelay| : If true, disable Nagle algorithm.
163 // |callback| : Called when the setNoDelay attempt is complete. 163 // |callback| : Called when the setNoDelay attempt is complete.
164 static void setNoDelay(long socketId, 164 static void setNoDelay(long socketId,
165 boolean noDelay, 165 boolean noDelay,
166 SetNoDelayCallback callback); 166 SetNoDelayCallback callback);
167 }; 167 };
168 168
169 }; 169 };
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/extensions/api_test/dns/api/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698