Establishing Connection
To establish an iLink 3 connection, use the OnixS::CME::iLink3::Session::connect method.
To handle network errors during the connection establishment, one needs to catch OnixS::CME::iLink3::Exceptions::SessionException exceptions from the OnixS::CME::iLink3::Session::connect method and try to connect again.
- See also
- Session Initialization and Binding
-
Reconnection
Closing Connection
To disconnect the session, use the OnixS::CME::iLink3::Session::disconnect method.
Example
{
public:
{
std::clog << msg << std::endl;
}
};
const std::string CounterpartyHost = "Localhost";
const int CounterpartyPort = 64124;
.secretKey("secretKey")
.accessKey("accessKey")
.firmId("firmId");
MyListener listener;
const int MarketSegmentId = 54;
Session session(settings, MarketSegmentId, &listener);
session.connect(CounterpartyHost, CounterpartyPort);
session.disconnect();