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

Unified Diff: chrome/common/extensions/api/extension_api.json

Issue 8743017: Real (but naive) UDP socket sending. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial. Created 9 years, 1 month 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/extension_api.json
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index 6ce75e91046cd889d28f07e08862db114c81fc43..015fca3e26566a09f4b53ee28d46a64d86954ae8 100644
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -9171,7 +9171,7 @@
"bytes": {
"type": "blob",
"optional": true,
- "description": "The data received, as a Blob."
+ "description": "The data received."
},
"errorCode": {
"type": "integer",
@@ -9240,6 +9240,19 @@
]
},
{
+ "name": "destroy",
+ "type": "function",
+ "description": "Destroys the socket. Each socket created should be destroyed after use.",
+ "parameters": [
+ {
+ "name": "socketId",
+ "type": "integer",
+ "description": "The socketId.",
+ "minimum": 1
+ }
+ ]
+ },
+ {
"name": "connect",
"type": "function",
"description": "Connects the socket to the given address. In the case of a UDP socket, this method merely associates the address with the socket for future sent data.",
@@ -9277,34 +9290,22 @@
]
},
{
- "name": "disconnect",
+ "name": "close",
"type": "function",
- "description": "Disconnects the socket.",
+ "description": "Closes the socket.",
"parameters": [
{
"name": "socketId",
"type": "integer",
"description": "The socketId.",
"minimum": 1
- },
- {
- "name": "callback",
- "type": "function",
- "description": "Called when the disconnection is complete.",
- "parameters": [
- {
- "type": "boolean",
- "name": "result",
- "description": "True if successful, false otherwise."
- }
- ]
}
]
},
{
- "name": "send",
+ "name": "write",
"type": "function",
- "description": "Sends data on the connected socket.",
+ "description": "Writes data on the connected socket.",
"parameters": [
{
"name": "socketId",
@@ -9313,18 +9314,22 @@
"minimum": 1
},
{
+ "name": "data",
+ "type": "string",
+ "description": "The data to write. Warning: will probably become a blob or other appropriate binary-friendly type."
+ },
+ {
"name": "callback",
"type": "function",
- "description": "Called when the send is complete.",
+ "description": "Called when any of the following happens: the write operation completes, the write operation blocked before completion, or an error occurred.",
"parameters": [
{
"type": "object",
- "name": "sendInfo",
+ "name": "writeInfo",
"properties": {
- "bytesSent": {
+ "bytesWritten": {
"type": "integer",
- "minimum": 0,
- "description": "The number of bytes sent."
+ "description": "The number of bytes sent, or a negative error code."
}
}
}

Powered by Google App Engine
This is Rietveld 408576698