/// <summary> /// 请求上下文 /// </summary> /// <param name="session">当前会话对象</param> /// <param name="packet">数据包对象</param> /// <param name="allSessions">所有会话对象</param> internal RequestContext(JsonWebSocketSession session, JsonPacket packet, ISessionManager allSessions) { this.Session = session; this.Packet = packet; this.AllSessions = allSessions; }
/// <summary> /// 设置会话的包装对象 /// </summary> /// <param name="session">会话</param> /// <param name="wrapper">包装对象</param> protected override void OnSetProtocolWrapper(ISession session, WebSocketSession wrapper) { var jsonWebSocketSession = new JsonWebSocketSession(this, wrapper); session.SetProtocolWrapper(Protocol.WebSocket, jsonWebSocketSession); }
/// <summary> /// 请求上下文 /// </summary> /// <param name="session">当前会话对象</param> /// <param name="packet">数据包对象</param> /// <param name="allSessions">所有会话对象</param> internal RequestContext(JsonWebSocketSession session, JsonPacket packet, IEnumerable <JsonWebSocketSession> allSessions) { this.Session = session; this.Packet = packet; this.AllSessions = allSessions; }