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