abstract class WebSocketListener
WebSocketListener() |
open fun onClosed(webSocket: WebSocket, code: Int, reason: String): Unit
Invoked when both peers have indicated that no more messages will be transmitted and the connection has been successfully released. No further calls to this listener will be made. |
|
open fun onClosing(webSocket: WebSocket, code: Int, reason: String): Unit
Invoked when the remote peer has indicated that no more incoming messages will be transmitted. |
|
open fun onFailure(webSocket: WebSocket, t: Throwable, response: Response?): Unit
Invoked when a web socket has been closed due to an error reading from or writing to the network. Both outgoing and incoming messages may have been lost. No further calls to this listener will be made. |
|
open fun onMessage(webSocket: WebSocket, text: String): Unit
Invoked when a text (type open fun onMessage(webSocket: WebSocket, bytes: ByteString): Unit
Invoked when a binary (type |
|
open fun onOpen(webSocket: WebSocket, response: Response): Unit
Invoked when a web socket has been accepted by the remote peer and may begin transmitting messages. |