Establishing Connection
To establish an FIXP session, use the OnixS::B3::BOE::Session::connect method.
To handle network errors during the connection establishment, one needs to catch OnixS::B3::BOE::Exceptions::SessionException exceptions from the OnixS::B3::BOE::Session::connect method and try to connect again.
- See also
- Session Initialization and Binding
-
Reconnection
Closing Connection
To disconnect the session, use the OnixS::B3::BOE::Session::disconnect method.
Example
{
public:
{
std::clog << msg << std::endl;
}
};
const std::string CounterpartyHost = "Localhost";
const int CounterpartyPort = 64124;
.accessKey("Value Received From B3")
.enteringFirm(100 )
.tradingSystemName("Your Trading System Name Here");
MyListener listener;
Session session(settings, &listener);
session.connect(CounterpartyHost, CounterpartyPort);
session.disconnect();