[英]Quickfix/N the callbacks ToApp ToAdming is not trigering in Initiator
I created simple quickfix application:我创建了简单的快速修复应用程序:
public static void Main()
{
SessionSettings settings = new SessionSettings("C:\\Users\\user\\Desktop\\Work\\QFLib\\config\\Config2.txt");
MyQuickFixApp myApp = new MyQuickFixApp();
IMessageStoreFactory storeFactory = new FileStoreFactory(settings);
ILogFactory logFactory = new FileLogFactory(settings);
var acceptor = new SocketInitiator(
myApp,
storeFactory,
settings,
logFactory);
bool sendlogon = true;
acceptor.Start();
while (true)
{
if(sendlogon)
myApp.SendLogonRequest(myApp.session.SessionID);
sendlogon = false;
Thread.Sleep(1000);
}
acceptor.Stop();
}
}
The problem server is not getting requests, and not sending response.问题服务器没有收到请求,也没有发送响应。 The configs looks okay and generated message also looks good.配置看起来不错,生成的消息也看起来不错。 I also sending generated message via TCP client and in that case on server I get parse error and no response.我还通过 TCP 客户端发送生成的消息,在这种情况下,在服务器上我得到解析错误并且没有响应。 The config file: Config file The logs: logs配置文件:配置文件日志:日志
As Cristoph John answered I didn't need to send logon.正如克里斯托夫约翰回答的那样,我不需要发送登录信息。 I just needed to add code to autologin:我只需要向自动登录添加代码:
public void ToAdmin(Message msg, SessionID sessionID)
{
Console.WriteLine("ToAdmin " + msg);
if (msg.GetType() == typeof(QuickFix.FIX44.Logon))
{
msg.SetField(new Password("Password"));
msg.SetField(new ResetSeqNumFlag(true));
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.