onClose

suspend fun onClose(code: Int, reason: String?)

Sends a WebSocketFrame.Close to the incomingFrames flow, and completes it normally.

This adapter cannot be used anymore after a call to this method; calling any method may throw an exception.