コード例 #1
0
        protected override void OnClientConnected(Socket clientSocket)
        {
            MonitoringClient client = new MonitoringClient(clientSocket);

            client.ClientDisconnected += OnClientDisconnected;
            mClientsList.Add(client);
            client.HandleClient();
        }
コード例 #2
0
 protected override void OnClientDisconnected(object sender, EventArgs e)
 {
     if (sender is MonitoringClient)
     {
         MonitoringClient client = sender as MonitoringClient;
         mClientsList.Remove(client);
         client.Dispose();
     }
 }