Skip to content

Instantly share code, notes, and snippets.

@oleander
Created October 15, 2011 12:34
Show Gist options
  • Save oleander/1289496 to your computer and use it in GitHub Desktop.
Save oleander/1289496 to your computer and use it in GitHub Desktop.
/* Both fails */
$(function() {
Beacon.listen(function(payload) {
console.debug("payload=", payload);
});
Beacon.connect('key', ['incoming'], {
log: true
});
});
/* Plain Websocket */
var ws = new WebSocket("ws://server1.beaconpush.com/spheres/key/users/key2?authToken=t&channels=incoming");
ws.onopen = function(evt) {
console.debug("onopen");
};
ws.onmessage = function(evt) { console.debug("onmessage"); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment