closeConnection

Closes the websocket connection if the transport is a WebSocketNetworkTransport.

Throws