public void onClientConnect(IAsyncResult result)
        {
            ConnectionWorker worker = (ConnectionWorker)result.AsyncState;
            TcpClient        client = worker.server.EndAcceptTcpClient(result);

            worker.handle.onConnect(client);
        }
 public void Start()
 {
     try
     {
         listener    = new TcpListener(IPAddress.Any, port);
         this.worker = new ConnectionWorker(listener, this);
         thread      = new Thread(new ThreadStart(worker.Start));
         listener.Start();
         tickrate.Start();
         thread.Start();
     } catch (ArgumentOutOfRangeException e)
     {
         Console.WriteLine($"[Server]: {e.Message}");
     }
 }