OnixS C++ CME MDP Conflated TCP Handler  1.2.1
API Documentation
Establishing Connection

Establishing Connection

To establish an Conflated TCP connection, use the OnixS::CME::ConflatedTCP::Session::connect method.

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

See also

Closing Connection

To disconnect the session, use the OnixS::CME::ConflatedTCP::Session::disconnect method.


using namespace OnixS::CME::ConflatedTCP;
class MyListener : public SessionListener
void onNegotiationResponse(const NegotiationResponse202& msg, Session* /*sn*/) ONIXS_CONFLATEDTCP_OVERRIDE
std::clog << msg << std::endl;
const std::string CounterpartyHost = "Localhost";
const int CounterpartyPort = 64124;
SessionSettings settings;
MyListener listener;
const int MarketSegmentId = 54;
Session session(settings, MarketSegmentId, &listener, ONIXS_CONFLATEDTCP_NULLPTR);
session.connect(CounterpartyHost, CounterpartyPort);
// ...