Exemplo n.º 1
0
 public NetManager()
 {
     m_Socket           = new TSocket();
     m_LogicRecvHandler = new LogicRecvHandler(m_Socket);
     m_LogicSendHandler = new LogicSendHandler(m_Socket);
 }
Exemplo n.º 2
0
        private BinaryReader m_BinaryReader           = null; //-- 反序列化Packet的辅助变量

        #endregion

        #region 构造函数

        public LogicRecvHandler(TSocket socket)
        {
            m_Socket            = socket;
            m_LogicRemainingBuf = new MemoryStream();
        }
Exemplo n.º 3
0
 public LogicSendHandler(TSocket socket)
 {
     m_Socket       = socket;
     m_LogicSendBuf = new MemoryStream(TNetConfig.DEFAULT_SOCKET_OUTPUT_BUFFERSIZE);
     m_BinaryWriter = new BinaryWriter(m_LogicSendBuf, System.Text.Encoding.ASCII);
 }