如何硬編碼啓動器和接受器的設置,以便我不需要外部設置文件?如何硬編碼設置
這是我到目前爲止已經試過:
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
任何想法?
我沒有看到使用設置文件的好處。你真的需要以編程方式設置設置嗎? –
是的,我願意。這些是我的要求。 – Qsiris