OnixS C++ ICE Binary Order Entry Handler 1.0.0
API Documentation
Loading...
Searching...
No Matches
Establishing Connection

Establishing Connection

To establish a connection, use the OnixS::ICE::BOE::Session::connect method.

To handle network errors during the connection establishment, one needs to catch OnixS::ICE::BOE::Exceptions::SessionException exceptions from the OnixS::ICE::BOE::Session::connect method and try to connect again.

See also
Reconnection

Closing Connection

To disconnect the session, use the OnixS::ICE::BOE::Session::disconnect method.

Example

using namespace OnixS::ICE::BOE;
class MyListener : public SessionListener
{
public:
void onExecutionReport_New(const ExecutionReport_New msg, Session* /*sn*/) override
{
std::clog << msg << std::endl;
}
};
settings.licenseStore("../../license")
.userId("SessionId")
.rawData("rawData")
.ipSessionToken("ipSessionToken");
MyListener listener;
Session session(SessionType::BUS, settings, &listener);
session.connect(host, port);
// ...
session.disconnect();