Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sorry if the question is too basic (I don't code in Node.js) but where is the websocket handshaking and the envelop management on this?


Creating a new server will start listening for connections, and the connection event will only be emitted after the handshake has finished. http://socket.io/ has more info on how the node api works.

    wss = new Server port: 8080
    wss.on 'connection', (ws) ->


{ Server } = require 'ws'




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: