make work with ws or socket.io