Exemplo n.º 1
0
 public void removeConnection(ClientConnection connection)
 {
     if (connection != null)
     {
         this.Log("client " + connection.clientIp + " disconnected");
         if (connection.locationSource != null)
             connection.locationSource.Detach(connection);
         this.connections.Remove(connection);
     }
 }
Exemplo n.º 2
0
        private void ListenForUpdateClients()
        {
            try
            {
                this.updateProviderListener.Start();

                while (true)
                {
                    this.Log("listening for clients...");
                    TcpClient client = this.updateProviderListener.AcceptTcpClient();
                    ClientConnection connection = new ClientConnection(client);
                    this.connections.Add(connection);
                    this.Log("client " + connection.clientIp + " connected");
                }
            }
            catch (ThreadAbortException)
            {
                return;
            }
        }