#include <B2BITS_FastSession.h>


Public Types | |
| enum | State { ESTABLISHED, INITIAL, NON_GRACEFULLY_TERMINATED, CORRECTLY_TERMINATED, WAIT_FOR_CONFIRM_LOGON, WAIT_FOR_CONFIRM_LOGOUT, WAIT_FOR_FIRST_LOGON, SWITCH_CONNECTION } |
Public Member Functions | |
| virtual FIXVersion | getVer () const =0 |
| virtual State | getState () const =0 |
| virtual FastApplication * | registerApplication (FastApplication *pNewApplication, unsigned int delay=1000, int maxTries=-1)=0 |
| virtual Session::Role | getRole () const =0 |
| virtual void | connect ()=0 |
| virtual void | connect (const std::string &host, int port)=0 |
| virtual void | connect (const FastMessage &customLogonMsg, const std::string &host, int port)=0 |
| virtual int | getRemotePort ()=0 |
| virtual const std::string * | getRemoteHost ()=0 |
| virtual void | disconnect (bool markAsTerminated)=0 |
| virtual void | disconnect (const std::string &logoutText, bool markAsTerminated)=0 |
| virtual void | disconnectNonGracefully ()=0 |
| virtual void | put (FastMessage *pMsg)=0 |
| virtual const std::string * | getSender () const =0 |
| virtual const std::string * | getTarget () const =0 |
| virtual const std::string * | getId () const =0 |
| void | resetEncodingFrame () |
| virtual void | encodeFast (FastMessage *msg, FIXVersion preferredVersion, Utils::RawBuffer *msgBuf)=0 |
| virtual FastMessage * | decodeFast (const char *buf, int size, FIXVersion preferredVersion)=0 |
Static Public Member Functions | |
| static const char * | state2string (State state) |
| virtual FIXVersion Engine::FastSession::getVer | ( | ) | const [pure virtual] |
Returns session protocol
| virtual State Engine::FastSession::getState | ( | ) | const [pure virtual] |
Returns session state
| static const char* Engine::FastSession::state2string | ( | State | state | ) | [static] |
Converts session state id into string representation
| virtual FastApplication* Engine::FastSession::registerApplication | ( | FastApplication * | pNewApplication, | |
| unsigned int | delay = 1000, |
|||
| int | maxTries = -1 | |||
| ) | [pure virtual] |
Registers Application. When any application callback executed - new Application coudn't be registered immediately. Session will tries to register new application during delay*triesAmount period.
| pNewApplication | Instance of class derived from Application that handles session's events. | |
| delay | - the time delay in microseconds when session tries to registrate new application | |
| maxTries | - the amount of attempts during session tries to registrate new application. '-1' means INFINITE attempt. |
| virtual Session::Role Engine::FastSession::getRole | ( | ) | const [pure virtual] |
Returns session role type
| virtual void Engine::FastSession::connect | ( | ) | [pure virtual] |
Create session as acceptor
| virtual void Engine::FastSession::connect | ( | const std::string & | host, | |
| int | port | |||
| ) | [pure virtual] |
Create session as initiator
| virtual void Engine::FastSession::connect | ( | const FastMessage & | customLogonMsg, | |
| const std::string & | host, | |||
| int | port | |||
| ) | [pure virtual] |
Create session as initiator with custom Logon message
| virtual int Engine::FastSession::getRemotePort | ( | ) | [pure virtual] |
For the session-initiator, returns port
| virtual const std::string* Engine::FastSession::getRemoteHost | ( | ) | [pure virtual] |
For the session-initiator, returns host
| virtual void Engine::FastSession::disconnect | ( | bool | markAsTerminated | ) | [pure virtual] |
disconnect session
| virtual void Engine::FastSession::disconnect | ( | const std::string & | logoutText, | |
| bool | markAsTerminated | |||
| ) | [pure virtual] |
disconnect session with reason
| virtual void Engine::FastSession::disconnectNonGracefully | ( | ) | [pure virtual] |
disconnect session non gracefully, without FastAlert message
| virtual void Engine::FastSession::put | ( | FastMessage * | pMsg | ) | [pure virtual] |
Sends message into the session
| virtual const std::string* Engine::FastSession::getSender | ( | ) | const [pure virtual] |
Returns session sender name
| virtual const std::string* Engine::FastSession::getTarget | ( | ) | const [pure virtual] |
Returns session receiver name
| virtual const std::string* Engine::FastSession::getId | ( | ) | const [pure virtual] |
Returns session id (pair sender-receiver )
| void Engine::FastSession::resetEncodingFrame | ( | ) |
Reset state of the dictionaries. Call cause FastReset message sending
| virtual void Engine::FastSession::encodeFast | ( | FastMessage * | msg, | |
| FIXVersion | preferredVersion, | |||
| Utils::RawBuffer * | msgBuf | |||
| ) | [pure virtual] |
Encodes FastMessage into the binary raw buffer
1.5.6