closeConnection

fun NetworkTransport.closeConnection(reason: Throwable)

A shorthand for WebSocketNetworkTransport.closeConnection. If the NetworkTransport is not a WebSocketNetworkTransport, a NotImplementedError is thrown.