示例#1
0
        /// <summary>
        /// 关闭事件压入队列
        /// </summary>
        /// <param name="nErrCode">关闭错误码</param>
        public void PushClosedEvent(NetErrCode nErrCode)
        {
            NetEvent netEvent = CInstacePoolKeepNumber <NetEvent> .Alloc();

            netEvent.m_nEvtType = NetEvtType.Event_Closed;
            netEvent.m_nErrCode = nErrCode;
            this.EnQueue(netEvent);
        }
示例#2
0
        /// <summary>
        /// 接收事件压入队列
        /// </summary>
        /// <param name="dataLen">数据长度</param>
        public void PushReceiveEvent(int dataLen)
        {
            NetEvent netEvent = CInstacePoolKeepNumber <NetEvent> .Alloc();

            netEvent.m_nEvtType = NetEvtType.Event_Receive;
            netEvent.m_dataLen  = dataLen;
            this.EnQueue(netEvent);
        }
示例#3
0
        /// <summary>
        /// 连接事件压入队列
        /// </summary>
        /// <param name="bSuccess">是否连接成功</param>
        public void PushConnectEvent(bool bSuccess)
        {
            NetEvent netEvent = CInstacePoolKeepNumber <NetEvent> .Alloc();

            netEvent.m_nEvtType = NetEvtType.Event_Connect;
            netEvent.m_bSuccess = bSuccess;
            this.EnQueue(netEvent);
        }