internal void RemoveSession(ProudSession session)
 {
     Configuration.Logger?.Debug("Removing session {HostId}", session.HostId);
     _sessions.Remove(session.HostId);
     SessionsByUdpId.Remove(session.UdpSessionId);
     OnDisconnected(session);
 }
Exemple #2
0
 internal RemotePeer(P2PGroup group, ProudSession session, Crypt crypt)
 {
     Group            = group;
     HostId           = session.HostId;
     Crypt            = crypt;
     ConnectionStates = new ConcurrentDictionary <uint, P2PConnectionState>();
     Session          = session;
 }
Exemple #3
0
 internal void AddSession(ProudSession session)
 {
     //using (_sync.Lock())
     {
         Configuration.Logger?.Debug("Adding new session {HostId}", session.HostId);
         _sessions[session.HostId] = session;
         OnConnected(session);
     }
 }
Exemple #4
0
 protected virtual void OnDisconnected(ProudSession session)
 {
     Disconnected?.Invoke(this, session);
 }
Exemple #5
0
 public ErrorEventArgs(ProudSession session, Exception exception)
 {
     Session   = session;
     Exception = exception;
 }