OnixS C++ B3 BOE Binary Order Entry  1.2.0
API Documentation
Handling Gateway Failure

In the case of a primary gateway failure, the connection must be switched to the backup gateway. The session negotiation must be performed before the connection is established since it’s done once per gateway. B3 recommends using the same Session Version Identification (sessionVerId) used for the session to the failed server.

Example

class MySessionListener : public OnixS::B3::BOE::SessionListener
{
};
settings.licenseStore("../../license")
.sessionId(100000000 /* "Value Received From B3" */)
.accessKey("Value Received From B3")
.enteringFirm(100 /* "Value Received From B3" */)
.tradingSystemName("Your Trading System Name Here");
MySessionListener listener;
Session session(settings, &listener);
session.connect(PrimaryGateway, GatewayPort);
// The failure of the primary gateway is detected.
session.reset();
session.connect(BackupGateway, GatewayPort);