/// <summary>
 /// 初始化
 /// </summary>
 /// <param name="middleware">关联的中间件</param>
 /// <returns></returns>
 internal JsonWebSocketApiService Init(JsonWebSocketMiddleware middleware)
 {
     this.Middleware = middleware;
     return(this);
 }
 /// <summary>
 /// JsonWebSocket的客户端对象
 /// </summary>
 /// <param name="server">服务器实例</param>
 /// <param name="session">WebSocket会话</param>
 public JsonWebSocketSession(JsonWebSocketMiddleware server, WebSocketSession session)
 {
     this.middleware = server;
     this.session    = session;
 }