Runs the Handler in receiveProductDefinitionsOnly mode: it downloads the product definitions for the requested subscriptions and stops automatically once they have all been received, without processing live market data.
Source code
#include "../Common/Defaults.h"
#include "../Common/ServiceEventTracer.h"
#include "../Common/Utils.h"
#include <cstdlib>
#ifndef _WIN32
# include <pthread.h>
# include <csignal>
# include <cstdio>
# include <vector>
#endif
int main(int , char** )
{
try
{
introduceMyself("Receive Product Definitions Only");
handler.bindFeedEngine(feedEngine);
ServiceEventTracer serviceEventTracer;
serviceEventTracer.attachTo(handler);
);
subscriptions.insert(brentFutures);
handler.start(subscriptions);
{
CurrentThread::sleep(1000);
}
std::cout << "Done." << std::endl;
}
catch (const std::exception& ex)
{
std::cerr << "Error: " << ex.what() << std::endl;
return EXIT_FAILURE;
}
catch (...)
{
std::cerr << "Unknown exception." << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}