close

external fun close(code: Double = definedExternally, reason: String = definedExternally)(source)

Closes the connection. Calling close() while still CONNECTING aborts the handshake.