websocket testing code