Enum RelayConnectionStatus
State of the connection to the relay server.
Namespace: Unity.Networking.Transport.Relay
Assembly: solution.dll
Syntax
public enum RelayConnectionStatus
Fields
Name | Description |
---|---|
AllocationInvalid | Connection to the relay server has failed due to an invalid allocation. This status indicates that the allocation used to connect to the relay server is invalid, either because an invalid allocation was provided in NetworkSettings.WithRelayParameters or because the allocation timed out due to inactivity (the latter can happen if the value of relayConnectionTimeMS provided in NetworkSettings.WithRelayParameters is too high or if ScheduleUpdate(JobHandle) is not called often enough). In both cases, this is an unrecoverable error. A new allocation needs to be created through the relay service, and a new NetworkDriver needs to be created with that allocation. |
Established | Connection to the relay server is established. Once a connection to the relay server is established, it will remain so until either the NetworkDriver is disposed of, or an error occurs that invalidates the relay service allocation. In the latter case, the status will change to AllocationInvalid. |
NotEstablished | Connection has yet to be established to the relay server. Establishing a connection will be done automatically when calling Connect(NetworkEndPoint) or Bind(NetworkEndPoint). If the connection is successful, the status changes to Established. If not successful, the status changes to AllocationInvalid. |
NotUsingRelay | The NetworkDriver is not configured to use Unity Relay. |