The code below shows how to connect to the event builder as a client:
Example 37-1. Connecting to the event builder as a data source.
#include <CEventOrderClient> ... std::string eventBuilderHost; ... unsigned int evbPort; try { evbPort = CEventOrderClient::Lookup(eventBuilderHost); } catch (CErrnoException& e) { ... } CEventOrderClient evb(eventBuilderHost, evbPort); try { evb.Connect(); } catch (CErrnoException& e) { ... }
CEventOrderClient
therefore
one of these is created. Note that this does
not connect to the event builder.
Connect
method actually attempts
to perform the connection to the event builder.
Lookup
an exception is
thrown if the connection could not be established.