Пример #1
0
 private void DoClientConnected(SocketSession session)
 {
     _oClientDic.Add(session.SocketId, session.SocketObj);
     if (ClientConnected != null)
     {
         ClientConnectedEventArgs args = new ClientConnectedEventArgs(session);
         ClientConnected(this, args);
     }
 }
Пример #2
0
 private void DoClientDisConnected(SocketSession session)
 {
     lock (ClentDicLocker)
     {
         _oClientDic.Remove(session.SocketId);
     }
     if (ClientDisconnected != null)
     {
         ClientConnectedEventArgs args = new ClientConnectedEventArgs(session);
         ClientDisconnected(this, args);
     }
 }