public Session CreateSession(HttpServlet servlet) { lSessionCount++; Session newSession = new Session(lSessionCount, servlet); mSessionDic.Add(lSessionCount, newSession); return newSession; }
/// <summary> /// 服务端使用的构造函数 /// </summary> /// <param name="servlet"></param> public BinaryDataParser(HttpServlet servlet) { string strContent = servlet.getContentText(); stream = new BinaryStream(); mSession = SessionMgr.GetIns().CreateSession(servlet); stream.SetContent(Convert.FromBase64String(strContent)); }
public Session(long lSessionid, HttpServlet servlet) { lSessionId = lSessionid; mServletOwner = servlet; mMsgManager = new ServerMsgManager(lSessionid, mServletOwner); }
/// <summary> /// 连接处理 /// </summary> /// <param name="servlet"></param> protected void HandleDisconnect(HttpServlet servlet) { if (servlet == null || Disconnect == null) return; Disconnect(NetCommon.Net.ENet.HttpServer, servlet); }
/// <summary> /// 连接处理 /// </summary> /// <param name="servlet"></param> protected void HandleConnected(HttpServlet servlet) { if (servlet == null || Connected == null) return; Connected(NetCommon.Net.ENet.HttpServer, servlet); }
/// <summary> /// 接收到数据 /// </summary> /// <param name="servlet"></param> /// <param name="byData"></param> /// <param name="length"></param> public void ReceiveData(HttpServlet servlet, byte[] byData, int length) { if (servlet == null || Receive == null) return; Receive(NetCommon.Net.ENet.HttpServer, servlet, byData, length, 0); }
public ServerMsgManager( long lOwnerSessionId, HttpServlet servlet ) { mOwnerSessionId = lOwnerSessionId; mServletOwner = servlet; }
/// <summary> /// push /// </summary> void PushServlet(HttpServlet hs) { lock (servletsLock) { processServlets.Enqueue(hs); } }