title: How Would I Build A NodeJS Websocket Server Without A Library
body: <p>I've recently built a small JSON webservice in NodeJS, and am interested in extending it to accept requests via WebSockets.</p>
  
  <p>Most of the WebSocket tutorials I have found so far are based on 3rd party modules like SocketIO.</p>
  
  <p>What does it take to write a WebSocket server?
  Assume that cross-browser compatibility is a non issue here, and that all my clients will have access to a decent browser.</p>