Modules | |
Establishing FIX Connection | |
Exchanging Messages | |
Message Sequence Numbers |
A FIX session is defined as a bi-directional stream of ordered messages between two parties within a continuous sequence number series. It is represented by the OnixS::FIX::Session class.
To create a session the OnixS::FIX::Session::Session constructors have to be used.
Minimal set of parameters required to construct session instance contains sender and target identifiers, version of FIX protocol to be used by the session and instance of OnixS::FIX::ISessionListener class whose members will be called by constructed session due to miscellaneous events like appearance of incoming FIX message.
A Session can participate in FIX connection in one of two roles: as an Acceptor or as an Initiator.
Acceptor is the receiving party of the FIX session. It listens for the incoming connection on the pre-defined port. The Acceptor has responsibility to perform first level authentication and formally declare the connection request "accepted" through transmission of an acknowledgment Logon message.
Initiator establishes the telecommunications link and initiates the session via transmission of the initial Logon message.
To determine role of the session OnixS::FIX::Session::getRole member can be used.
To gracefully terminate the session OnixS::FIX::Session::shutdown method must be used.