Skip to main content

JoinedServerInfo

A class in Root.Township, Alta.Networking.

Client: the server you are joined to, sent by the server in ConfirmJoinMessage. Current holds it for the session.

Constructors​

MemberWhat it is
JoinedServerInfo(GameServerInfo serverInfo)Creates a JoinedServerInfo with default values.
JoinedServerInfo()Creates a JoinedServerInfo with default values.

Fields​

3 private and internal fields
MemberWhat it is
private int identifierBacking field for Identifier.
private bool isPublicServerWhether the joined server is public. Sent in Serialize but not exposed.
private string nameBacking field for Name.

Properties​

MemberWhat it is
ConnectionInfo ConnectionInfo { get; set; }Connection details used to reach the server. Set by JoinServerPipeline.
static JoinedServerInfo Current { get; set; }The server joined now. Set when the server accepts the join request, cleared when leaving or on failure.
int Identifier { get; }Server id. -1 means a local server.
GameServerInfoMinimal Info { get; private set; }Minimal server info. On the client it is rebuilt from the received id and name only.
bool IsLocalServer { get; }True when Identifier is -1.
string Name { get; }Server name.

Methods​

MemberWhat it is
void Serialize(Stream stream)Reads or writes the id, name and a public-server flag.

Used in​

Members of other types that take, return or hold a JoinedServerInfo: