basic web sockets code