simple socket io implementation. example from socket.io website