Class RelayServerEndpoint
The endpoint connection details of a Relay server.
Inherited Members
Namespace: Unity.Services.Apis.Relay
Assembly: Unity.Services.Apis.dll
Syntax
[DataContract(Name = "RelayServerEndpoint")]
[Preserve]
public class RelayServerEndpoint
Constructors
RelayServerEndpoint(string, NetworkEnum, bool, bool, string, int)
Initializes a new instance of the Relay
Declaration
[Preserve]
public RelayServerEndpoint(string connectionType = null, RelayServerEndpoint.NetworkEnum network = (RelayServerEndpoint.NetworkEnum)0, bool reliable = false, bool secure = false, string host = null, int port = 0)
Parameters
Type | Name | Description |
---|---|---|
string | connectionType | Canonical connection type: - udp: Use for plain UDP connections. - dtls: Use for secured UDP connections. See DTLS encryption to learn more. - wss: Use for secured WebSocket connections. (required). |
Relay |
network | The IP network. (required). |
bool | reliable | A boolean value indicating whether the delivery of the data is guaranteed. (required). |
bool | secure | A boolean value indicating whether the endpoint is secured. (required). |
string | host | The host name or IP address of the Relay server. (required). |
int | port | The port number of the Relay server. (required). |
Properties
ConnectionType
Canonical connection type: - udp: Use for plain UDP connections. - dtls: Use for secured UDP connections. See DTLS encryption to learn more. - wss: Use for secured WebSocket connections.
Declaration
[DataMember(Name = "connectionType", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string ConnectionType { get; set; }
Property Value
Type | Description |
---|---|
string | Canonical connection type: - udp: Use for plain UDP connections. - dtls: Use for secured UDP connections. See DTLS encryption to learn more. - wss: Use for secured WebSocket connections. |
Host
The host name or IP address of the Relay server.
Declaration
[DataMember(Name = "host", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Host { get; set; }
Property Value
Type | Description |
---|---|
string | The host name or IP address of the Relay server. |
Network
The IP network.
Declaration
[DataMember(Name = "network", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public RelayServerEndpoint.NetworkEnum Network { get; set; }
Property Value
Type | Description |
---|---|
Relay |
The IP network. |
Port
The port number of the Relay server.
Declaration
[DataMember(Name = "port", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public int Port { get; set; }
Property Value
Type | Description |
---|---|
int | The port number of the Relay server. |
Reliable
A boolean value indicating whether the delivery of the data is guaranteed.
Declaration
[DataMember(Name = "reliable", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public bool Reliable { get; set; }
Property Value
Type | Description |
---|---|
bool | A boolean value indicating whether the delivery of the data is guaranteed. |
Secure
A boolean value indicating whether the endpoint is secured.
Declaration
[DataMember(Name = "secure", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public bool Secure { get; set; }
Property Value
Type | Description |
---|---|
bool | A boolean value indicating whether the endpoint is secured. |