GooglePlayGames. BasicApi. Nearby. INearbyConnectionClient
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)
|
void
Accepts a connection request from a remote endpoint.
|
DisconnectFromEndpoint(string remoteEndpointId)
|
void
Disconnects from a remote endpoint.
|
GetAppBundleId()
|
string
Gets the app bundle ID.
|
GetServiceId()
|
string
Gets the service ID used for discovery and connection.
|
MaxReliableMessagePayloadLength()
|
int
Gets the maximum length of a reliable message payload.
|
MaxUnreliableMessagePayloadLength()
|
int
Gets the maximum length of an unreliable message payload.
|
RejectConnectionRequest(string requestingEndpointId)
|
void
Rejects a connection request from a remote endpoint.
|
SendConnectionRequest(string name, string remoteEndpointId, byte[] payload, Action< ConnectionResponse > responseCallback, IMessageListener listener)
|
void
Sends a connection request to a remote endpoint.
|
SendReliable(List< string > recipientEndpointIds, byte[] payload)
|
void
Sends a reliable message to a list of recipients.
|
SendUnreliable(List< string > recipientEndpointIds, byte[] payload)
|
void
Sends an unreliable message to a list of recipients.
|
StartAdvertising(string name, List< string > appIdentifiers, TimeSpan? advertisingDuration, Action< AdvertisingResult > resultCallback, Action< ConnectionRequest > connectionRequestCallback)
|
void
Starts advertising the local device to nearby devices.
|
StartDiscovery(string serviceId, TimeSpan? advertisingTimeout, IDiscoveryListener listener)
|
void
Starts discovering nearby endpoints for a specific service.
|
StopAdvertising()
|
void
Stops advertising the local device to nearby devices.
|
StopAllConnections()
|
void
Stops all connections to nearby endpoints.
|
StopDiscovery(string serviceId)
|
void
Stops 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 |
|