cancel

open fun cancel()

Cancels this session as soon as possible.

The ClosedListener will be called once the WebSocket Session is closed. The Close Reason will be "CANCELLED_BY_USER".