docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ServerConfig

    The server configuration for the current session.

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

    Constructors

    ServerConfig(long, string, ushort, ushort, string, string)

    Creates an instance of ServerConfig. Note that you should not manually create one of these except for testing. Instead, use MultiplayService.ServerConfig to access the server configuration.

    Declaration
    [Preserve]
    public ServerConfig(long serverId, string allocationId, ushort queryPort, ushort port, string ip, string serverLogDirectory)
    Parameters
    Type Name Description
    long serverId

    The Server ID.

    string allocationId

    The Allocation ID for the server.

    ushort queryPort

    The Query Port.

    ushort port

    The Game Session Port.

    string ip

    The Game Session IP Address.

    string serverLogDirectory

    The Server Log Directory.

    Properties

    AllocationId

    The allocation ID.

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

    IpAddress

    The connection ip for the session.

    Declaration
    [Preserve]
    [DataMember(Name = "ip", IsRequired = false, EmitDefaultValue = false)]
    public string IpAddress { get; }
    Property Value
    Type Description
    string

    Port

    The connection port for the session.

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

    QueryPort

    The Server Query Protocol Port.

    Declaration
    [Preserve]
    [DataMember(Name = "queryPort", IsRequired = true, EmitDefaultValue = false)]
    public ushort QueryPort { get; }
    Property Value
    Type Description
    ushort

    ServerId

    The server ID.

    Declaration
    [Preserve]
    [DataMember(Name = "serverID", IsRequired = true, EmitDefaultValue = false)]
    public long ServerId { get; }
    Property Value
    Type Description
    long

    ServerLogDirectory

    The directory logs will be written to.

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