确定 QuickFix 是使用主要主机还是次要主机进行连接

Identify whether the QuickFix is using primary or secondary host to connect

我正在使用 QuickFix/N

对于 initiator/Client 应用程序,有谁知道是否有办法确定 quickfix 应用程序是否正在使用主要主机 SocketConnectHost=xxx 和 SocketConnectPort=yyyy 或 Alternative/Backup/Secondary 主机,即 SocketConnectHost1=rrr 和SocketConnectPort=zzz 连接到 server/acceptor.

查看 QuickFix 配置教程,我没有看到任何可以让我找到答案的内容。

http://quickfixn.org/tutorial/configuration.html http://www.quickfixengine.org/quickfix/doc/html/configuration.html

没有API,但QuickFIX/N里面的信息是已知的。它确实记录了它,在这里:https://github.com/connamara/quickfixn/blob/master/QuickFIXn/Transport/SocketInitiator.cs#L226

如果你想挖掘出这些信息,你可以修改 QuickFIX/N 来制作一些私有的东西 public(寻找 socketEndPoint),或者实现一个记录器来捕获相关短语,或者做一些系统级的自省,即使用系统 API 像这样询问 "What TCP connections do I have open now,":Get all TCP-connections opened by application using C#