Public reference data delivered by London Stock Exchange contains the technical configuration, e.g. multicast address and port combinations for market data interface, address and port combinations for recovery and reply services and login-password combination to get access to the services.
Following example demonstrates how to use OnixS::EuroTLX::MarketData::Mitch::Handler:
// Listeners definition, add all the required callbacks struct MyListener : public TimeListener, public WarningListener, public ErrorListener // etc { // Inherited from Time Message Listener virtual void onTime (const TimeMsg& time, const DataSource& dataSource){}; // Inherited from Warning Listener // Is called when the Warning condition is detected virtual void onWarning (const std::string& reason){}; // Inherited from Error Listener // Notifications about errors virtual void onError (ErrorCode::Enum code, const std::string& description){}; // etc }; // Create an instance handler's settings. OnixS::EuroTLX::MarketData::Mitch::HandlerSettings handlerSettings; // ... // adjust Handler's settings as described above OnixS::EuroTLX::MarketData::Mitch::Handler handler (settings); // Listener's instance MyListener myListener; // register callbacks handler.registerErrorListener (&myListener); handler.registerTimeMessageListener (&myListener); handler.registerWarningListener (&myListener); try { // start the handler handler.start(); } catch (const std::exception& ex) { clog << "Unable to start the handler: " << ex.what() << endl; } catch (...) { clog << "Unable to start the handler" << endl; } clog << "Please press Enter key to stop the handler..." << endl; waitUntilEnterKey (); clog << "Stopping..." << endl; // stop the handler handler.stop (true); clog << "The Handler has been stopped." << endl;