The connection flow is two-step:
- Connect to BUS and request BGW connectivity data.
- Connect to BGW using the returned IP, port, and session token.
- Note
- The specification states that the BGW session token is valid for the current exchange day only.
Establishing Connection
To establish a connection, use the OnixS::ICE::BOE::BusSession::connect or use the OnixS::ICE::BOE::BgwSession::connect method.
To handle network errors during the connection establishment, one needs to catch OnixS::ICE::BOE::Exceptions::SessionException exceptions from the connect method and try to connect again.
- See also
- Reconnection
Closing Connection
To disconnect the session, use the OnixS::ICE::BOE::Session::disconnect method.
Example
busSession.connect(host, port);
auto bgwCredentialsFuture = busSession.getBgwCredentialsAsync(bgwUserId);
busSession.disconnect();
bgwSession.disconnect();
- See also
- Getting Started Sample