OnixS C++ B3 BOE Binary Order Entry  1.2.0
API Documentation
Session States

The OnixS::B3::BOE::SessionStateId::Enum reflects all session states that can occur during its lifetime and what a specific state means.

The OnixS::B3::BOE::Session::state member returns the current session state.

Tracking Session State Changes

To be notified about a session state change, override the OnixS::B3::BOE::SessionListener::onStateChange, and supply the class instance to the OnixS::B3::BOE::Session's constructor.

Example

using namespace OnixS::B3::BOE;
class SessionStateListener : public SessionListener
{
public:
void onStateChange(SessionStateId::Enum newState, SessionStateId::Enum prevState, Session* /*session*/) override
{
std::clog << "Session's state is changed, prevState=" << SessionStateId::toString(prevState)
<< ", newState=" << SessionStateId::toString(newState) << std::endl;
}
};
See also
Listening to Session Events