Initial methods for socket.io communication