예제 #1
0
 private void ServerConnectionClosed(object sender, TcpClientConnectionEventArgs e)
 {
     if (_onlineUsers.TryRemove(e.TcpClient, out var user) && user != null)
     {
         OnUserSignOut(new MidgeUserEventArgs(user));
     }
 }
예제 #2
0
 private void ServerConnectionOpened(object sender, TcpClientConnectionEventArgs e)
 {
     _onlineUsers.TryAdd(e.TcpClient, null);
 }