Enum RelayConnectionStatus
State of the connection to the relay server.
Namespace: Unity.Networking.Transport.Relay
Syntax
public enum RelayConnectionStatus
Fields
Name | Description | Value |
---|---|---|
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. |
0 |
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. |
1 |
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 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. |
2 |