-debug- destroying non-socket.io upgradeAs it turns out, dojox/socket is a fairly plain wrapper over the browser's built-in Websocket object (with long-polling support added). Socket.io does rather a bit more and (rightly or wrongly) seems to prefer talking to itself. Luckily, if you're not too picky, you can easily include the official (AMD-compatible) socket.io client: [codesyntax lang="javascript"]
require([ '../socket.io/socket.io.js' ], function(io) { var socket = io.connect('ws://localhost:8000'); socket.send("Hiya server!"); });[/codesyntax] Note that the proper relative path to the socket.io.js file has to be specified (the proper version of this file is automatically served by socket.io through node.js).
Originally posted by William Barnes (Billy Barnes)