Beispiel #1
0
        public override void OnReceivedBizMsg(CT2Connection lpConnection, int hSend, CT2BizMessage lpMsg)
        {
            UFXLogger.Info(logger, "OnReceivedBizMsg: 成功触发回调接收数据!");
            //获取返回码
            int iRetCode = lpMsg.GetReturnCode();

            //获取错误码
            int iErrorCode = lpMsg.GetErrorNo();

            int iFunction = lpMsg.GetFunction();

            if (iRetCode != 0)
            {
                logger.Error("异步接收数据出错:" + lpMsg.GetErrorNo().ToString() + lpMsg.GetErrorInfo());
            }
            else
            {
                HandleReceivedBizMsg(SendType.Async, (UFXFunctionCode)iFunction, hSend, lpMsg);
            }
        }
Beispiel #2
0
 //public override void OnSent(CT2Connection lpConnection, int hSend, IntPtr lpData, int nLength, int nQueuingData)
 //{
 //    logger.Info("OnSend: 发送数据成功!");
 //}
 public override void OnSent(CT2Connection lpConnection, int hSend, void *lpData, int nLength, int nQueuingData)
 {
     UFXLogger.Info(logger, "OnSend: 发送数据成功!");
 }
Beispiel #3
0
 public override void OnSafeConnect(CT2Connection lpConnection)
 {
     UFXLogger.Info(logger, "OnSafeConnect: 成功建立安全连接!");
 }
Beispiel #4
0
 public override void OnRegister(CT2Connection lpConnection)
 {
     UFXLogger.Info(logger, "OnRegister: 服务端成功注册!");
 }
Beispiel #5
0
 public override void OnReceivedBizEx(CT2Connection lpConnection, int hSend, CT2RespondData lpRetData, string lppStr, CT2UnPacker lppUnPacker, int nResult)
 {
     UFXLogger.Info(logger, "OnReceivedBizEx:成功触发回调接收数据!");
 }
Beispiel #6
0
 public override void OnConnect(CT2Connection lpConnection)
 {
     UFXLogger.Info(logger, "OnConnect:连接成功建立!");
 }
Beispiel #7
0
 public override void OnClose(CT2Connection lpConnection)
 {
     //_conn.Close();
     UFXLogger.Info(logger, "OnClose: 连接断开!");
 }