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

Unified Diff: chrome/common/extensions/api/experimental_socket.idl

Issue 10796067: Improve the socket API documentation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update Created 8 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/experimental_socket.idl
diff --git a/chrome/common/extensions/api/experimental_socket.idl b/chrome/common/extensions/api/experimental_socket.idl
index bb17d763ca27f4ffc83d182dadbbe306a2d3c973..64c1917bcc0ee5b73ce735f90d7efbe9fffb762e 100644
--- a/chrome/common/extensions/api/experimental_socket.idl
+++ b/chrome/common/extensions/api/experimental_socket.idl
@@ -102,7 +102,9 @@ namespace experimental.socket {
// |socketId| : The socketId.
static void disconnect(long socketId);
- // Reads data from the given socket.
+ // Reads data from the given socket. The received data will be delivered to
+ // caller via callback function. Note: The given socket should be connected
miket_OOO 2012/07/20 19:27:44 Add "the" after "via." I'm not sure this addition
Peng 2012/07/20 20:06:39 Done
+ // by using connect() function.
// |socketId| : The socketId.
// |bufferSize| : The read buffer size.
// |callback| : Delivers data that was available to be read without
@@ -111,35 +113,33 @@ namespace experimental.socket {
optional long bufferSize,
ReadCallback callback);
- // Writes data on the given socket.
+ // Writes data on the given socket. Note: The given socket should be
+ // connected by using connect() function.
miket_OOO 2012/07/20 19:27:44 Same comment as above. This addition is superfluou
Peng 2012/07/20 20:06:39 Done.
// |socketId| : The socketId.
// |data| : The data to write.
- // |callback| : Called when the first of any of the following happens: the
- // write operation completes without blocking, the write operation blocked
- // before completion (in which case onEvent() will eventually be called with
- // a <code>writeComplete</code> event), or an error occurred.
+ // |callback| : Called when the write operation completes without blocking
+ // or an error occurred.
miket_OOO 2012/07/20 19:27:44 Match verb tenses ("occurred" is inconsistent).
Peng 2012/07/20 20:06:39 Done.
static void write(long socketId,
ArrayBuffer data,
WriteCallback callback);
- // Reads data from the given socket.
+ // Receive data from the given socket. The received data and the sender's
miket_OOO 2012/07/20 19:27:44 Match voice ("Receive" is inconsistent). The adde
Peng 2012/07/20 20:06:39 Done.
+ // address will be delivered to caller via callback function.
// |socketId| : The socketId.
// |bufferSize| : The receive buffer size.
- // |callback| : Delivers data that was available to be read without
- // blocking.
+ // |callback| : Delivers data that was available to be read and
+ // sender's address without blocking.
miket_OOO 2012/07/20 19:27:44 Same comment as above -- I'd change this to someth
Peng 2012/07/20 20:06:39 Done.
static void recvFrom(long socketId,
optional long bufferSize,
RecvFromCallback callback);
- // Writes data on the given socket.
+ // Send data to the given address. The socket should be a UDP socket.
miket_OOO 2012/07/20 19:27:44 Match voice ("Send" is inconsistent). It would be
Peng 2012/07/20 20:06:39 Done.
// |socketId| : The socketId.
// |data| : The data to write.
// |address| : The address of the remote machine.
// |port| : The port of the remote machine.
- // |callback| : Called when the first of any of the following happens: the
- // write operation completes without blocking, the write operation blocked
- // before completion (in which case onEvent() will eventually be called with
- // a <code>writeComplete</code> event), or an error occurred.
+ // |callback| : Called when the send operation completes without blocking
+ // or an error occurred.
miket_OOO 2012/07/20 19:27:44 Match tense ("occurred").
Peng 2012/07/20 20:06:39 Done.
static void sendTo(long socketId,
ArrayBuffer data,
DOMString address,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698