Class NetworkDriverRelayExtensions
Extenstions to NetworkDriver related to Unity Relay.
Inherited Members
Namespace: Unity.Networking.Transport.Relay
Assembly: Unity.Networking.Transport.dll
Syntax
public static class NetworkDriverRelayExtensions
Methods
Connect(NetworkDriver)
Connect to the relay server without specifying an endpoint.
Declaration
public static NetworkConnection Connect(this NetworkDriver driver)
Parameters
Type | Name | Description |
---|---|---|
NetworkDriver | driver | Driver to use for the connection. |
Returns
Type | Description |
---|---|
NetworkConnection | The new connection (or default if connection failed). |
GetRelayConnectionStatus(NetworkDriver)
Get the current status of the connection to the relay server.
Declaration
public static RelayConnectionStatus GetRelayConnectionStatus(this NetworkDriver driver)
Parameters
Type | Name | Description |
---|---|---|
NetworkDriver | driver | Driver to query the status from. |
Returns
Type | Description |
---|---|
RelayConnectionStatus | Current relay connection status. |