IsExpectedWSCloseError returns boolean indicating whether the error is a clean disconnection.
Websocket exposes the bits of *websocket.Conn we actually use. Note that we are emulating an `io.ReadWriter`. This is to be able to support RPC codecs, which operate on byte streams.
Dial initiates a new websocket connection.
Ping adds a periodic ping to a websocket connection.
Upgrade upgrades the HTTP server connection to the WebSocket protocol.