Example #1
0
        private void DoClientConnected(IAsyncResult result)
        {
            TcpClient newClient = m_listener.EndAcceptTcpClient(result);

            if (newClient != null)
            {
                m_worker.ReportProgress(0, "Client connected from " + newClient.Client.LocalEndPoint.ToString());

                ClientConnection newClientConnection                = new ClientConnection(newClient);
                newClientConnection.ClientConnectionDisconnected    += new ClientConnectionDisconnectedHandler(ClientConnectionDisconnected);
                newClientConnection.ReportAdded                     +=new ClientReportHandler(ClientReportAdded);

                m_clientsToAdd.Enqueue(newClientConnection);
            }

            m_listener.BeginAcceptTcpClient(new AsyncCallback(DoClientConnected), null);
        }
Example #2
0
 private void ClientReportAdded(ClientConnection client, String report)
 {
     m_worker.ReportProgress(0, report);
 }
Example #3
0
 void m_server_ClientDisconnected(ClientConnection connection)
 {
 }
Example #4
0
 private void ClientConnectionDisconnected(ClientConnection connection)
 {
     m_worker.ReportProgress(0, "Client Disconnected from " + connection.TcpClient.Client.LocalEndPoint);
     m_clientsToRemove.Enqueue(connection);
 }
 void TCPServer_ClientDisconnected(ClientConnection connection)
 {
     OnPropertyChanged("NumClients");
 }