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
{
public:
void onExecutionReport_New(const ExecutionReport_New msg, Session* ) override
{
std::clog << msg << std::endl;
}
};
settings.licenseStore("../../license")
.userId("SessionId")
.rawData("rawData")
.ipSessionToken("ipSessionToken");
MyListener listener;
session.connect(host, port);
session.disconnect();