disconnect

abstract fun disconnect(code: Int, reason: String? = null)

Disconnect from the Server

Parameters

code

Status code as defined by Section 7.4 of RFC 6455.

reason

Reason for shutting down or {@code null}.