Constructor RelayServerData
RelayServerData(string, ushort, byte[], byte[], byte[], byte[], bool)
Create a new Relay server data structure.
Declaration
public RelayServerData(string host, ushort port, byte[] allocationId, byte[] connectionData, byte[] hostConnectionData, byte[] key, bool isSecure)
Parameters
Type | Name | Description |
---|---|---|
string | host | IP address of the Relay server. |
ushort | port | Port of the Relay server. |
byte[] | allocationId | ID of the Relay allocation. |
byte[] | connectionData | Connection data of the allocation. |
byte[] | hostConnectionData | Connection data of the host (same as previous for hosts). |
byte[] | key | HMAC signature of the allocation. |
bool | isSecure | Whether the Relay connection is to be secured or not. |
RelayServerData(ref NetworkEndPoint, ushort, RelayAllocationId, string, string, string, bool)
Initializes a new instance of the Relay
Declaration
[Obsolete("Will be removed in Unity Transport 2.0. Use the new constructor introduced in 1.3 instead.", false)]
public RelayServerData(ref NetworkEndPoint endpoint, ushort nonce, RelayAllocationId allocationId, string connectionData, string hostConnectionData, string key, bool isSecure)
Parameters
Type | Name | Description |
---|---|---|
Network |
endpoint | The endpoint |
ushort | nonce | The nonce |
Relay |
allocationId | The allocation id |
string | connectionData | The connection data |
string | hostConnectionData | The host connection data |
string | key | The key |
bool | isSecure | The is secure |
RelayServerData(ref NetworkEndPoint, ushort, ref RelayAllocationId, ref RelayConnectionData, ref RelayConnectionData, ref RelayHMACKey, bool)
Initializes a new instance of the Relay
Declaration
public RelayServerData(ref NetworkEndPoint endpoint, ushort nonce, ref RelayAllocationId allocationId, ref RelayConnectionData connectionData, ref RelayConnectionData hostConnectionData, ref RelayHMACKey key, bool isSecure)
Parameters
Type | Name | Description |
---|---|---|
Network |
endpoint | The endpoint |
ushort | nonce | The nonce |
Relay |
allocationId | The allocation id |
Relay |
connectionData | The connection data |
Relay |
hostConnectionData | The host connection data |
Relay |
key | The key |
bool | isSecure | The is secure |