[Quickfix-users] Application hangs
Brought to you by:
orenmnero
From: dev13 <jo...@gm...> - 2011-06-01 08:03:54
|
Hi, I was creating a windows application that accepts FIX messages and publishes messages in string format ("EURUSD:1.4443:1.4444;"). I have attached the piece of code that connects to the FIX MarketData provider. The problem is if I use 'initiator.block()', then the application retrieves data from the provider but the application gets stuck i.e., I am not able to use any of the other controls in the user interface. And if I don't use 'initiator.block()', the application will exit with a runtime exception. Please advise. void Application::initConnection() { try { Application* appln = Application::getInstance(); FIX::SessionSettings settings = appln->getSettings(); FIX::ThreadedSocketInitiator initiator(*appln, FIX::NullStoreFactory(), settings); //initiator.start(); initiator.poll(); while(!initiator.isLoggedOn()) { Sleep(1000); } appln->sendMarketDataRequest(); //initiator.block(); initiator.stop(); } catch(char *str ) { ExtLogger.Out("Connection error : %s", str); } } -- View this message in context: http://old.nabble.com/Application-hangs-tp31747251p31747251.html Sent from the QuickFIX - User mailing list archive at Nabble.com. |