integrate socket.io in server and client side