internal void OnDisconnectedInternal(TcpSession session) { OnDisconnected(session); }
internal void OnDisconnectingInternal(TcpSession session) { OnDisconnecting(session); }
/// <summary> /// Handle session connecting notification /// </summary> /// <param name="session">Connecting session</param> protected virtual void OnConnecting(TcpSession session) { }
/// <summary> /// Handle session disconnected notification /// </summary> /// <param name="session">Disconnected session</param> protected virtual void OnDisconnected(TcpSession session) { }
/// <summary> /// Register a new session /// </summary> /// <param name="session">Session to register</param> /// <param name="eventArgs">Event args</param> internal void RegisterSession(TcpSession session, SocketArgs[] eventArgs) { // Register a new session session.InitializeInternal(Interlocked.Increment(ref _sessionId), this, eventArgs); Sessions.TryAdd(session.Id, session); }