private void _trade_OnRspAuthenticate(ThostFtdcRspAuthenticateField pRspAuthenticateField, ThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) { if (pRspInfo.ErrorID != 0) { throw new Exception($"认证失败:{nameof(pRspInfo.ErrorID)} {pRspInfo.ErrorID}, {nameof(pRspInfo.ErrorMsg)} {pRspInfo.ErrorMsg}"); } this.Login(); }
/// <summary> /// 验证回报 /// </summary> /// <param name="?"></param> /// <param name="?"></param> /// <param name="?"></param> /// <param name="?"></param> /// <param name="?"></param> /// <returns></returns> public void HandleOnRspAuthenticate(ThostFtdcRspAuthenticateField pRspAuthenticateField, ThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) { if (pRspInfo.ErrorID == 0) { this.ReqUserLogin(); } else { Console.WriteLine("服务器断开:--->>> Reason = {0}", pRspInfo.ErrorMsg); } }
///客户端认证响应 public void OnRspAuthenticate(ThostFtdcRspAuthenticateField pRspAuthenticateField, ThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast) { if (!IsErrorRspInfo(pRspInfo)) { } }