Added initWebsocket.