如何对启动器和接受器的设置进行硬编码,以便不需要外部设置文件?
这是我迄今为止尝试过的:
FIX::SessionSettings serverSettings;
FIX::Dictionary serverDictionary;
serverDictionary.setString("BeginString", "FIX.4.4");
serverDictionary.setString("UseDataDictionary", "Y");
serverDictionary.setString("DataDictionary", "../../../spec/FIX.4.4.xml");
serverDictionary.setString("SenderCompID", "SRVR");
serverDictionary.setString("TargetCompID", "CLNT");
serverDictionary.setString("SocketAcceptHost", "localhost");
serverDictionary.setLong("SocketAcceptPort", 2024);
FIX::SessionID serverSessionID;
serverSettings.set(serverSessionID, serverDictionary);
Server server; // Extends FIX::Application
FIX::FileStoreFactory serverStoreFactory("server/fileStore/");
FIX::FileLogFactory serverLogFactory("server/logs/");
FIX::SocketAcceptor acceptor(server, serverStoreFactory, serverSettings, serverLogFactory);
我认为我走在正确的道路上,但出现此错误:Configuration failed: BeginString must be FIX.4.0 to FIX.4.4 or FIXT.1.1
有任何想法吗?