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

Issue 10908045: Added intro to socket API reference docs. (Closed)

Created:
8 years, 3 months ago by mkearney1
Modified:
8 years, 3 months ago
Reviewers:
miket_OOO, dharcourt, battre
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org
Visibility:
Public.

Description

Added intro to socket API reference docs. Also improved Network Communications documentation: * removed experimental references * enhanced permissions to include new socket permission rules. I don't have a staged version of the docs up and running yet for new server. I've checked the docs locally though. local commit BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=154553

Patch Set 1 #

Patch Set 2 : #

Total comments: 8

Patch Set 3 : #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -16 lines) Patch
M chrome/common/extensions/docs/server2/templates/articles/app_network.html View 1 2 6 chunks +44 lines, -15 lines 11 comments Download
A chrome/common/extensions/docs/server2/templates/intros/socket.html View 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/server2/templates/public/apps/socket.html View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
miket_OOO
LGTM. A few nits on the permissions. Charles, will you have a look at that ...
8 years, 3 months ago (2012-08-31 22:33:59 UTC) #1
mkearney1
https://chromiumcodereview.appspot.com/10908045/diff/2001/chrome/common/extensions/docs/server2/templates/articles/app_network.html File chrome/common/extensions/docs/server2/templates/articles/app_network.html (right): https://chromiumcodereview.appspot.com/10908045/diff/2001/chrome/common/extensions/docs/server2/templates/articles/app_network.html#newcode58 chrome/common/extensions/docs/server2/templates/articles/app_network.html:58: <li>"tcp-connect:*:23" &ndash; For connecting port 23 of any hosts</li> ...
8 years, 3 months ago (2012-08-31 23:32:12 UTC) #2
battre
8 years, 3 months ago (2012-09-03 13:35:37 UTC) #3
Please do another iteration.

https://chromiumcodereview.appspot.com/10908045/diff/5001/chrome/common/exten...
File chrome/common/extensions/docs/server2/templates/articles/app_network.html
(right):

https://chromiumcodereview.appspot.com/10908045/diff/5001/chrome/common/exten...
chrome/common/extensions/docs/server2/templates/articles/app_network.html:10: <a
href="socket.html">Sockets API</a>.
Socket API (without s)

https://chromiumcodereview.appspot.com/10908045/diff/5001/chrome/common/exten...
chrome/common/extensions/docs/server2/templates/articles/app_network.html:49:
&lt;host> := '*' | '*.' &lt;anychar except '/' and '*'>+
Is this precise? www.example.com would not comply to '*.' &lt;anychar except '/'
and '*'>+

https://chromiumcodereview.appspot.com/10908045/diff/5001/chrome/common/exten...
chrome/common/extensions/docs/server2/templates/articles/app_network.html:82:
</pre>
Add an example how you check for errors in onConnectedCallback? Do you use
chrome.extension.lastError?

https://chromiumcodereview.appspot.com/10908045/diff/5001/chrome/common/exten...
chrome/common/extensions/docs/server2/templates/articles/app_network.html:128:
chrome.socket.create('udp', '127.0.0.1', 1337, {},
Does this open a socket for incoming traffic *from the net*? Or does it only
bind to the loopback device, which is not accessible from anywhere but my
computer?

https://chromiumcodereview.appspot.com/10908045/diff/5001/chrome/common/exten...
chrome/common/extensions/docs/server2/templates/articles/app_network.html:128:
chrome.socket.create('udp', '127.0.0.1', 1337, {},
This is incorrect. create does not take the IP address and port as separate
parameters.

https://chromiumcodereview.appspot.com/10908045/diff/5001/chrome/common/exten...
chrome/common/extensions/docs/server2/templates/articles/app_network.html:128:
chrome.socket.create('udp', '127.0.0.1', 1337, {},
socket.create() takes a CreateOptions parameter but there is no place that
describes the content of this dictionary.

https://chromiumcodereview.appspot.com/10908045/diff/5001/chrome/common/exten...
chrome/common/extensions/docs/server2/templates/articles/app_network.html:129:
function(socketInfo) {
Error handling?

https://chromiumcodereview.appspot.com/10908045/diff/5001/chrome/common/exten...
chrome/common/extensions/docs/server2/templates/articles/app_network.html:132:
chrome.socket.connect(socketId, function(result) {
This is wrong: connect takes an IP address and port as paramters.

https://chromiumcodereview.appspot.com/10908045/diff/5001/chrome/common/exten...
chrome/common/extensions/docs/server2/templates/articles/app_network.html:157:
var data = chrome.socket.read(d.socketId);
This is incorrect: Read uses a callback function.

https://chromiumcodereview.appspot.com/10908045/diff/5001/chrome/common/exten...
chrome/common/extensions/docs/server2/templates/articles/app_network.html:162:
chrome.socket.create('udp', '127.0.0.1', 1337, { onEvent: handleDataEvent },
This is incorrect. create does not take the IP address and port as separate
parameters.

https://chromiumcodereview.appspot.com/10908045/diff/5001/chrome/common/exten...
chrome/common/extensions/docs/server2/templates/articles/app_network.html:162:
chrome.socket.create('udp', '127.0.0.1', 1337, { onEvent: handleDataEvent },
Don't you need to bind() the socket for incoming data? The API documentation
states at the moment that bind() does not support UDP.

Powered by Google App Engine
This is Rietveld 408576698