ConnectionReceiver
@RequiresApi(value = 26) interface ConnectionReceiver
Receiver callback for a RemoteConnection.
Summary
| Public methods | |
|---|---|
| abstract void | onConnectionClosed(Called when the  | 
| abstract void | onMessageReceived(Called when a message is received on the  | 
Public methods
onConnectionClosed
abstract void onConnectionClosed(
@NonNull RemoteConnection remoteConnection,
Throwable error,
String reason
)
Called when the remoteConnection is closed.
| Parameters | |
|---|---|
| @NonNull RemoteConnection remoteConnection | The remote connection that is closed. | 
| Throwable error | The error causing the connection to be closed, or  | 
| String reason | The reason indicated by the remote end of the connection in their call to  | 
onMessageReceived
abstract void onMessageReceived(
@NonNull RemoteConnection remoteConnection,
@NonNull byte[] payload
)
Called when a message is received on the remoteConnection.
