docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RelayServerEndpoint

    The endpoint connection details of a Relay server.

    Inheritance
    object
    RelayServerEndpoint
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Services.Relay.Models
    Assembly: Unity.Services.Multiplayer.dll
    Syntax
    [Preserve]
    [DataContract(Name = "RelayServerEndpoint")]
    public class RelayServerEndpoint

    Constructors

    RelayServerEndpoint(string, NetworkOptions, bool, bool, string, int)

    The endpoint connection details of a Relay server.

    Declaration
    [Preserve]
    public RelayServerEndpoint(string connectionType, RelayServerEndpoint.NetworkOptions network, bool reliable, bool secure, string host, int port)
    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.

    RelayServerEndpoint.NetworkOptions network

    The IP network.

    bool reliable

    A boolean value indicating whether the delivery of the data is guaranteed.

    bool secure

    A boolean value indicating whether the endpoint is secured.

    string host

    The host name or IP address of the Relay server.

    int port

    The port number of the Relay server.

    Fields

    ConnectionTypeDtls

    Valid value of ConnectionType for dtls

    Declaration
    public const string ConnectionTypeDtls = "dtls"
    Field Value
    Type Description
    string

    ConnectionTypeUdp

    Valid value of ConnectionType for udp

    Declaration
    public const string ConnectionTypeUdp = "udp"
    Field Value
    Type Description
    string

    ConnectionTypeWss

    Valid value of ConnectionType for wss

    Declaration
    public const string ConnectionTypeWss = "wss"
    Field Value
    Type Description
    string

    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
    [Preserve]
    [DataMember(Name = "connectionType", IsRequired = true, EmitDefaultValue = true)]
    public string ConnectionType { get; }
    Property Value
    Type Description
    string

    Host

    The host name or IP address of the Relay server.

    Declaration
    [Preserve]
    [DataMember(Name = "host", IsRequired = true, EmitDefaultValue = true)]
    public string Host { get; }
    Property Value
    Type Description
    string

    Network

    The IP network.

    Declaration
    [Preserve]
    [JsonConverter(typeof(StringEnumConverter))]
    [DataMember(Name = "network", IsRequired = true, EmitDefaultValue = true)]
    public RelayServerEndpoint.NetworkOptions Network { get; }
    Property Value
    Type Description
    RelayServerEndpoint.NetworkOptions

    Port

    The port number of the Relay server.

    Declaration
    [Preserve]
    [DataMember(Name = "port", IsRequired = true, EmitDefaultValue = true)]
    public int Port { get; }
    Property Value
    Type Description
    int

    Reliable

    A boolean value indicating whether the delivery of the data is guaranteed.

    Declaration
    [Preserve]
    [DataMember(Name = "reliable", IsRequired = true, EmitDefaultValue = true)]
    public bool Reliable { get; }
    Property Value
    Type Description
    bool

    Secure

    A boolean value indicating whether the endpoint is secured.

    Declaration
    [Preserve]
    [DataMember(Name = "secure", IsRequired = true, EmitDefaultValue = true)]
    public bool Secure { get; }
    Property Value
    Type Description
    bool
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)