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
{
};
settings.licenseStore("../../license")
.sessionId(100000000 )
.accessKey("Value Received From B3")
.enteringFirm(100 )
.tradingSystemName("Your Trading System Name Here");
MySessionListener listener;
Session session(settings, &listener);
session.connect(PrimaryGateway, GatewayPort);
session.reset();
session.connect(BackupGateway, GatewayPort);