Skip to content

Convert samples to use chrome.sockets APIs available in Chrome 33 #205

Closed
wants to merge 14 commits into from

6 participants

@rpaquay
rpaquay commented Mar 4, 2014

No description provided.

@mangini mangini commented on the diff Mar 4, 2014
parrot-ar-drone/lib/API.js
@@ -179,13 +180,38 @@ DRONE.API = (function() {
if (SIMULATE) {
callbacks.onConnected(1);
} else {
- chrome.socket.create(sockRef.protocol, undefined, function(sockInfo) {
- sockRef.socket = sockInfo.socketId;
- chrome.socket[sockRef.type](sockRef.socket,
- sockRef.direction===TO_DRONE?DRONE_IP:CLIENT_IP,
- sockRef.port,
- callbacks.onConnected);
+ //chrome.socket.create(sockRef.protocol, undefined, function (sockInfo) {
+ // sockRef.socket = sockInfo.socketId;
@mangini
GoogleChrome member
mangini added a note Mar 4, 2014

Any reason to keep this code commented instead of removing it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mangini mangini commented on the diff Mar 4, 2014
parrot-ar-drone/manifest.json
-
- "udp-bind::5556",
- "udp-send-to::5556",
-
- "udp-bind::5559",
- "udp-send-to::5559"]
- }]
+ "permissions": ["system.network"],
+ "sockets": {
+ "udp": {
+ "bind": ":5554",
+ "send": ":5554",
+ "bind": ":5556",
+ "send": ":5556",
+ "bind": ":5559",
+ "send": ":5559",
@mangini
GoogleChrome member
mangini added a note Mar 4, 2014

Is this a valid syntax? Repeated keys in JSON dicts usually means the previous values are replaced, which would make this equivalent to "udp": {"bind": ":5559", "send": ":5559"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mangini mangini commented on the diff Mar 5, 2014
udp/manifest.json
@@ -3,16 +3,16 @@
"name": "Sample of UDP Network Access",
"description": "Echo..... Echo.",
"version": "2",
@mangini
GoogleChrome member
mangini added a note Mar 5, 2014

Please, bump the version of all modified samples, so they can be updated in CWS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@djdeath

How is this supposed to work?
Where are the 't' and 'acceptInfo' variable coming from?

@scheib
GoogleChrome member
scheib commented May 28, 2014

@rpaquay, update/respond to issues? Is this patch moving forward?

@rpaquay rpaquay was assigned by kalman Jun 17, 2014
@antonysargent

FYI, @rpaquay is looking at this again, and has opened https://code.google.com/p/chromium/issues/detail?id=392669 for tracking.

@SEIAROTg

I've already made a HTTP server with chrome.sockets at https://github.com/SEIAROTg/chrome.httpServer

@rpaquay rpaquay Merge remote-tracking branch 'upstream/master' into chrome.sockets.m33
Conflicts:
	mdns-browser/main.js
	mdns-browser/manifest.json
7080750
@rpaquay
rpaquay commented Aug 7, 2014

Closing this pull request, will be creating new ones later (one per sample).

@rpaquay rpaquay closed this Aug 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.