Created
May 11, 2012 13:58
-
-
Save ichernev/2659831 to your computer and use it in GitHub Desktop.
This code crashes socket.io server
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
socketIo = require 'socket.io' | |
socketIoClient = require 'socket.io-client' | |
serverOptions = | |
'log level': 2 | |
'match origin protocol': yes | |
# transports: ['xhr-polling'] | |
clientOptions = | |
transports: ['xhr-polling'] | |
'try multiple transports': no | |
serverSocket = socketIo.listen 8009, serverOptions | |
serverSocket.on 'connection', (socket) -> | |
console.log 'connected (server)' | |
clientSocket = socketIoClient.connect 'http://127.0.0.1:8009', clientOptions | |
clientSocket.on 'connect', -> | |
console.log 'connected (client)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment