Listener

interface Listener

Interface for listener.

Functions

Link copied to clipboard
abstract fun onConnected()

Called when the attempt started with .connect succeeds.

Link copied to clipboard
abstract fun onConnecting()

May be called when attempting to connect and the first sign of progress is seen.

Link copied to clipboard
abstract fun onDisconnected()

Called when the connection previously established with .connect has been disconnected.

Link copied to clipboard
abstract fun onError(error: Throwable)

Called if the transports encounters an unrecoverable error.

Link copied to clipboard
abstract fun onMessageReceived()

Called when receiving data from the peer.

Link copied to clipboard

Called when receiving a transport-specific session termination request.