Updated websocket client re-using server side code.