Stay organized with collections
Save and categorize content based on your preferences.
GooglePlayGames.BasicApi.Nearby.IMessageListener
Interface for receiving messages and notifications about remote endpoints.
Summary
Public functions
|
OnMessageReceived(string remoteEndpointId, byte[] data, bool isReliableMessage)
|
void
Called when a message is received from a remote endpoint.
|
OnRemoteEndpointDisconnected(string remoteEndpointId)
|
void
Called when a remote endpoint has disconnected.
|
Public functions
OnMessageReceived
void OnMessageReceived(
string remoteEndpointId,
byte[] data,
bool isReliableMessage
)
Called when a message is received from a remote endpoint.
Details |
Parameters |
remoteEndpointId
|
The ID of the remote endpoint.
|
data
|
The data of the received message.
|
isReliableMessage
|
Indicates whether the message is reliable.
|
|
OnRemoteEndpointDisconnected
void OnRemoteEndpointDisconnected(
string remoteEndpointId
)
Called when a remote endpoint has disconnected.
Details |
Parameters |
remoteEndpointId
|
The ID of the disconnected endpoint.
|
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-07-08 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-08 UTC."],[],[],null,["# GooglePlayGames.BasicApi.Nearby.IMessageListener Interface Reference\n\nGooglePlayGames.BasicApi.Nearby.IMessageListener\n================================================\n\nInterface for receiving messages and notifications about remote endpoints.\n\nSummary\n-------\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|\n| [OnMessageReceived](#interface_google_play_games_1_1_basic_api_1_1_nearby_1_1_i_message_listener_1af0c7c02a3d5569793897da38809ced5c)`(string remoteEndpointId, byte[] data, bool isReliableMessage)` | `void` Called when a message is received from a remote endpoint. |\n| [OnRemoteEndpointDisconnected](#interface_google_play_games_1_1_basic_api_1_1_nearby_1_1_i_message_listener_1aa320c7dffb2328ac1a56175107d1a57c)`(string remoteEndpointId)` | `void` Called when a remote endpoint has disconnected. |\n\nPublic functions\n----------------\n\n### OnMessageReceived\n\n```c#\nvoid OnMessageReceived(\n string remoteEndpointId,\n byte[] data,\n bool isReliableMessage\n)\n``` \nCalled when a message is received from a remote endpoint.\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |---------------------|--------------------------------------------| | `remoteEndpointId` | The ID of the remote endpoint. | | `data` | The data of the received message. | | `isReliableMessage` | Indicates whether the message is reliable. | |\n\n### OnRemoteEndpointDisconnected\n\n```c#\nvoid OnRemoteEndpointDisconnected(\n string remoteEndpointId\n)\n``` \nCalled when a remote endpoint has disconnected.\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|-----------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |--------------------|--------------------------------------| | `remoteEndpointId` | The ID of the disconnected endpoint. | |"]]