OnixS C++ ICE Binary Order Entry Handler 1.0.0
API Documentation
Loading...
Searching...
No Matches
Listening to Session Events

To be notified about a session event, override the corresponding member of the OnixS::ICE::BOE::SessionListener class, and supply the class instance to the OnixS::ICE::BOE::Session's constructor.

Note
Session event handling/listening is the synchronous operation, so it is recommended not to perform time-consuming tasks inside event handlers.

Example

using namespace OnixS::ICE::BOE;
struct SessionStateListener : public SessionListener
{
void onStateChange(SessionStateId::Enum newState, SessionStateId::Enum prevState, Session* /*session*/) override
{
std::clog
<< "\nSession's state is changed, prevState="
<< SessionStateId::toString(prevState)
<< ", newState="
<< SessionStateId::toString(newState)
<< std::endl;
}
};