Implemented socket.io communication method