Skip to content

Instantly share code, notes, and snippets.

@ichernev
Created May 11, 2012 13:58
Show Gist options
  • Save ichernev/2659831 to your computer and use it in GitHub Desktop.
Save ichernev/2659831 to your computer and use it in GitHub Desktop.
This code crashes socket.io server
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