GooglePlayGames.
Interface for managing connections and communications between devices using Nearby Connections.
Summary
Inheritance
Direct Known Subclasses:GooglePlayGames.BasicApi.Nearby.DummyNearbyConnectionClient| Public functions | |
|---|---|
| AcceptConnectionRequest(string remoteEndpointId, byte[] payload, IMessageListener listener) | voidAccepts a connection request from a remote endpoint.  | 
| DisconnectFromEndpoint(string remoteEndpointId) | voidDisconnects from a remote endpoint.  | 
| GetAppBundleId() | stringGets the app bundle ID.  | 
| GetServiceId() | stringGets the service ID used for discovery and connection.  | 
| MaxReliableMessagePayloadLength() | intGets the maximum length of a reliable message payload.  | 
| MaxUnreliableMessagePayloadLength() | intGets the maximum length of an unreliable message payload.  | 
| RejectConnectionRequest(string requestingEndpointId) | voidRejects a connection request from a remote endpoint.  | 
| SendConnectionRequest(string name, string remoteEndpointId, byte[] payload, Action< ConnectionResponse > responseCallback, IMessageListener listener) | voidSends a connection request to a remote endpoint.  | 
| SendReliable(List< string > recipientEndpointIds, byte[] payload) | voidSends a reliable message to a list of recipients.  | 
| SendUnreliable(List< string > recipientEndpointIds, byte[] payload) | voidSends an unreliable message to a list of recipients.  | 
| StartAdvertising(string name, List< string > appIdentifiers, TimeSpan? advertisingDuration, Action< AdvertisingResult > resultCallback, Action< ConnectionRequest > connectionRequestCallback) | voidStarts advertising the local device to nearby devices.  | 
| StartDiscovery(string serviceId, TimeSpan? advertisingTimeout, IDiscoveryListener listener) | voidStarts discovering nearby endpoints for a specific service.  | 
| StopAdvertising() | voidStops advertising the local device to nearby devices.  | 
| StopAllConnections() | voidStops all connections to nearby endpoints.  | 
| StopDiscovery(string serviceId) | voidStops discovering endpoints for a specific service.  | 
Public functions
AcceptConnectionRequest
void AcceptConnectionRequest( string remoteEndpointId, byte[] payload, IMessageListener listener )
Accepts a connection request from a remote endpoint.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters | 
 | 
DisconnectFromEndpoint
void DisconnectFromEndpoint( string remoteEndpointId )
Disconnects from a remote endpoint.
| Details | |||
|---|---|---|---|
| Parameters | 
 | 
GetAppBundleId
string GetAppBundleId()
Gets the app bundle ID.
| Details | |
|---|---|
| Returns | The app bundle ID. | 
GetServiceId
string GetServiceId()
Gets the service ID used for discovery and connection.
| Details | |
|---|---|
| Returns | The service ID. | 
MaxReliableMessagePayloadLength
int MaxReliableMessagePayloadLength()
Gets the maximum length of a reliable message payload.
| Details | |
|---|---|
| Returns | Maximum length of a reliable message payload. | 
MaxUnreliableMessagePayloadLength
int MaxUnreliableMessagePayloadLength()
Gets the maximum length of an unreliable message payload.
| Details | |
|---|---|
| Returns | Maximum length of an unreliable message payload. | 
RejectConnectionRequest
void RejectConnectionRequest( string requestingEndpointId )
Rejects a connection request from a remote endpoint.
| Details | |||
|---|---|---|---|
| Parameters | 
 | 
SendConnectionRequest
void SendConnectionRequest( string name, string remoteEndpointId, byte[] payload, Action< ConnectionResponse > responseCallback, IMessageListener listener )
Sends a connection request to a remote endpoint.
| Details | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Parameters | 
 | 
SendReliable
void SendReliable( List< string > recipientEndpointIds, byte[] payload )
Sends a reliable message to a list of recipients.
| Details | |||||
|---|---|---|---|---|---|
| Parameters | 
 | 
SendUnreliable
void SendUnreliable( List< string > recipientEndpointIds, byte[] payload )
Sends an unreliable message to a list of recipients.
| Details | |||||
|---|---|---|---|---|---|
| Parameters | 
 | 
StartAdvertising
void StartAdvertising( string name, List< string > appIdentifiers, TimeSpan? advertisingDuration, Action< AdvertisingResult > resultCallback, Action< ConnectionRequest > connectionRequestCallback )
Starts advertising the local device to nearby devices.
| Details | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Parameters | 
 | 
StartDiscovery
void StartDiscovery( string serviceId, TimeSpan? advertisingTimeout, IDiscoveryListener listener )
Starts discovering nearby endpoints for a specific service.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters | 
 | 
StopAdvertising
void StopAdvertising()
Stops advertising the local device to nearby devices.
StopAllConnections
void StopAllConnections()
Stops all connections to nearby endpoints.
StopDiscovery
void StopDiscovery( string serviceId )
Stops discovering endpoints for a specific service.
| Details | |||
|---|---|---|---|
| Parameters | 
 | 
