This interface is deprecated.
Use PayloadCallback
instead.
Listener for messages from a remote endpoint.
Public Method Summary
abstract void |
onDisconnected(String endpointId)
This method is deprecated. Implement
ConnectionLifecycleCallback.onDisconnected(String) instead.
|
abstract void |
onMessageReceived(String endpointId,
byte[] payload, boolean isReliable)
This method is deprecated. Implement
PayloadCallback.onPayloadReceived(String, Payload) instead.
|
Public Methods
public abstract void onDisconnected (String endpointId)
This method is deprecated.
Implement
ConnectionLifecycleCallback.onDisconnected(String)
instead.
Called when a remote endpoint is disconnected / becomes unreachable.
Parameters
endpointId | The identifier for the remote endpoint that disconnected. |
---|
public abstract void onMessageReceived (String endpointId, byte[] payload, boolean isReliable)
This method is deprecated.
Implement
PayloadCallback.onPayloadReceived(String, Payload)
instead.
Called when a message is received from a remote endpoint.
Parameters
endpointId | The identifier for the remote endpoint that sent the message. |
---|---|
payload | The bytes of the message sent by the remote endpoint. This array will not
exceed
Connections.MAX_RELIABLE_MESSAGE_LEN bytes for reliable messages, or
Connections.MAX_UNRELIABLE_MESSAGE_LEN for unreliable ones. |
isReliable | True if the message was sent reliably, false otherwise. |