コード例 #1
0
 /// <summary>
 /// Callback for when a connection had disconnected
 /// </summary>
 /// <param name="sender">The client object whom is disconnecting</param>
 private void ClientDisconnected(ChatClient client)
 {
     // Release this stream's AsyncEventArgs to the object pool
     //Release(client.Stream);
     client.Dispose();
     if (Clients.TryRemove(client.ConnectionID, out client) && !client.Disposed)
     {
         client.Dispose();
     }
 }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: wukonjp/CSharp
 private void Window_Closed(object sender, EventArgs e)
 {
     _chatServer.Dispose();
     _chatClient1.Dispose();
     _chatClient2.Dispose();
 }