Skip to main content

ConfirmJoinMessage

A internal struct in Root.Township, Alta.Networking. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

Internal message the server sends back to a client's join request: allowed or not, whether prerequisites are running, a join result and an error text. Server writes, client reads.

Constructors​

MemberWhat it is
ConfirmJoinMessage(bool isAllowed, bool isDoingPrerequisites, ClientJoinResult joinResult, JoinedServerInfo serverInfo = null, string error = null)Creates a ConfirmJoinMessage from isAllowed, isDoingPrerequisites, serverInfo and error.
ConfirmJoinMessage(bool isAllowed, bool isDoingPrerequisites, JoinedServerInfo serverInfo = null, string error = null)Creates a ConfirmJoinMessage from isAllowed, isDoingPrerequisites, serverInfo and error.

Fields​

4 private and internal fields
MemberWhat it is
private string errorBacking field for Error.
private bool isAllowedBacking field for IsAllowed.
private bool isDoingPrerequisitesBacking field for IsDoingPrerequisites.
private int joinResultBacking field for JoinResult, stored as an int for serialization.

Properties​

MemberWhat it is
string Error { get; }Why the join was refused. Only sent when IsAllowed is false.
bool IsAllowed { get; }Whether the server accepted the join.
bool IsDoingPrerequisites { get; }True on the first accepted reply, sent while the server runs join prerequisites. A second reply with this false finishes the join.
JoinedServerInfo JoinedServerInfo { get; set; }Info about the server, only sent when allowed and doing prerequisites.
ClientJoinResult JoinResult { get; }The ClientJoinResult code; defaults to JoinAccepted.

Methods​

MemberWhat it is
void Serialize(Connection connection, Stream stream)Reads or writes the message. The error is only sent when refused, and server info only during prerequisites.

Used in​

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