Class ServerConfig
The server configuration for the current session.
Inherited Members
Namespace: Unity.Services.Multiplay
Assembly: Unity.Services.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 = true, 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 |