Пример #1
0
    protected void SetServerInformations(World world)
    {
        ServerInformations info = new ServerInformations();

        info.server        = this;
        info.world         = world;
        serverInformations = info;
    }
Пример #2
0
    public bool OnlyValidate(ServerInformations serverInformations, IPEndPoint actualClient)
    {
        this.serverInformations = serverInformations;
        this.actualClient       = actualClient;

        alreadyValidate = CheckAllValidation();
        return(alreadyValidate);
    }
Пример #3
0
    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");
        }
    }
Пример #4
0
 public ServerParser(ServerInformations serverInformations)
 {
     this.serverInformations = serverInformations;
 }