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); }
private void ClientReportAdded(ClientConnection client, String report) { m_worker.ReportProgress(0, report); }
void m_server_ClientDisconnected(ClientConnection connection) { }
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"); }