-
-
Save codyyc/fef86f53eb97e1a160a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="http://pace-test.jit.su/socket.io/socket.io.js"></script> | |
<script> | |
var socket = io.connect('http://pace-test.jit.su'); | |
socket.on('news', function (data) { | |
console.log(data); | |
socket.emit('my other event', { my: 'data' }); | |
}); | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET http://pace-test.jit.su/socket.io/1/?t=1342042513488 -200 OK -589ms socket.io.js (line 1632) | |
And the two errors instantly following: | |
"NetworkError: 500 Internal Server Error - http://pace-test.jit.su/socket.io/1/websocket/5902873241354834559" 590287...4834559 | |
and: | |
Firefox can't establish a connection to the server at ws://pace-test.jit.su/socket.io/1/websocket/5902873241354834559.this.websocket = new Socket(this.prepareUrl() + query); | |
They are then followed by xhr-polling requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "pace-test", | |
"subdomain": "pace-test", | |
"version": "0.0.0-7", | |
"author": "Cody Carnachan <********>", | |
"scripts": { | |
"start": "node server.js" | |
}, | |
"dependencies": { | |
"socket.io": "0.9.6" | |
}, | |
"noAnalyze": true, | |
"engines": { | |
"node": "0.6" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var io = require('socket.io').listen(3000); | |
io.sockets.on('connection', function (socket) { | |
socket.emit('news', { hello: 'world' }); | |
socket.on('my other event', function (data) { | |
console.log(data); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment