Implement a web socket that reconnects on close.