ConnectionReceiver
@RequiresApi(value = 26) interface ConnectionReceiver
Receiver callback for a RemoteConnection
.
Summary
Public functions |
|
---|---|
Unit |
onConnectionClosed( Called when the |
Unit |
onMessageReceived(remoteConnection: RemoteConnection, payload: ByteArray) Called when a message is received on the |
Public functions
onConnectionClosed
fun onConnectionClosed(
remoteConnection: RemoteConnection,
error: Throwable? = null,
reason: String? = null
): Unit
Called when the remoteConnection
is closed.
Parameters | |
---|---|
remoteConnection: RemoteConnection |
The remote connection that is closed. |
error: Throwable? = null |
The error causing the connection to be closed, or |
reason: String? = null |
The reason indicated by the remote end of the connection in their call to |
onMessageReceived
fun onMessageReceived(remoteConnection: RemoteConnection, payload: ByteArray): Unit
Called when a message is received on the remoteConnection
.