                 @peerRemove socket
             @sockets.splice @sockets.indexOf(socket), 1
 
+        # Called when a new peer has arrived.
         serverOnConnection   : (socket) =>
             socket.cid      = -1
             socket.rid      = -1


                @socketOnSend sock, ["peer.remove", socket.cinfo]

        socketOnSend      : (socket, msg) =>
            msg = JSON.stringify(msg)



            @sockets.push socket

        # Start the websocket server services.
        start       : () =>
            server      = Http.createServer((req, res) ->).listen Config.Websocket.Port, () =>
                console.log "Server ready on port #{Config.Websocket.Port}"
