add web socket to js version