protected void SetServerInformations(World world) { ServerInformations info = new ServerInformations(); info.server = this; info.world = world; serverInformations = info; }
public bool OnlyValidate(ServerInformations serverInformations, IPEndPoint actualClient) { this.serverInformations = serverInformations; this.actualClient = actualClient; alreadyValidate = CheckAllValidation(); return(alreadyValidate); }
public void ValidateAndExecute(ServerInformations serverInformations, IPEndPoint actualClient) { this.serverInformations = serverInformations; this.actualClient = actualClient; CustomDebug.Log("Try to validate " + GetType() + " From " + actualClient.Address.ToString() + ":" + actualClient.Port.ToString(), VerboseLevel.ALL); if (alreadyValidate || CheckAllValidation()) { CustomDebug.Log("Execute " + GetType() + " From " + actualClient.Address.ToString() + ":" + actualClient.Port.ToString(), VerboseLevel.ALL); if (Execute()) { AddMainThreadAction(); } serverInformations.server.ResetTimeout(actualClient); } else { throw new BadDataException("Data is corrupted"); } }
public ServerParser(ServerInformations serverInformations) { this.serverInformations = serverInformations; }