Implemented socket.io. Sent messages as socket