Struct RelayConnectionData
This is the encrypted data that the Relay server uses for describing a connection. Used mainly in the connection establishing process (Binding).
Inherited Members
Namespace: Unity.Networking.Transport.Relay
Assembly: Unity.Networking.Transport.dll
Syntax
public struct RelayConnectionData
Fields
Value
The raw data of the Connection Data
Declaration
public byte* Value
Field Value
Type | Description |
---|---|
byte* |
k_Length
The length in bytes of the Connection Data.
Declaration
public const int k_Length = 255
Field Value
Type | Description |
---|---|
int |
Methods
FromByteArray(byte[])
Convert a byte array to a Relay
Declaration
public static RelayConnectionData FromByteArray(byte[] data)
Parameters
Type | Name | Description |
---|---|---|
byte[] | data | Array to convert. |
Returns
Type | Description |
---|---|
Relay |
New Relay |
FromBytePointer(byte*, int)
Converts a byte pointer to a RelayConnectionData.
Declaration
public static RelayConnectionData FromBytePointer(byte* dataPtr, int length)
Parameters
Type | Name | Description |
---|---|---|
byte* | dataPtr | The pointer to the data of the Connection Data. |
int | length | The length of the data. |
Returns
Type | Description |
---|---|
Relay |
Returns a RelayConnectionData constructed from the provided data. |
Exceptions
Type | Condition |
---|---|
Argument |
Provided byte array length is invalid, must be {k_Length} but got {length}. |