Struct RelayConnectionData
Encrypted data that the Relay server uses to describe a connection.
Inherited Members
Namespace: Unity.Networking.Transport.Relay
Assembly: Unity.Networking.Transport.dll
Syntax
public struct RelayConnectionData
Fields
Value
Raw value of the connection data.
Declaration
public byte* Value
Field Value
Type | Description |
---|---|
byte* | Connection data as a fixed byte array. |
k_Length
Length of the connection data.
Declaration
public const int k_Length = 255
Field Value
Type | Description |
---|---|
int | Length in bytes. |
Methods
FromByteArray(byte[])
Convert a byte array to a connection data structure.
Declaration
public static RelayConnectionData FromByteArray(byte[] data)
Parameters
Type | Name | Description |
---|---|---|
byte[] | data | Array to convert. |
Returns
Type | Description |
---|---|
RelayConnectionData | New connection data. |
FromBytePointer(byte*, int)
Convert a raw buffer to a connection data structure.
Declaration
public static RelayConnectionData FromBytePointer(byte* dataPtr, int length)
Parameters
Type | Name | Description |
---|---|---|
byte* | dataPtr | Raw pointer to buffer to convert. |
int | length | Length of the buffer to convert. |
Returns
Type | Description |
---|---|
RelayConnectionData | New connection data. |