|
| hf_session_client (const FIX8::F8MetaCntx &ctx, const FIX8::SessionID &sid, FIX8::Persister *persist=nullptr, FIX8::Logger *logger=nullptr, FIX8::Logger *plogger=nullptr) |
|
bool | handle_application (const unsigned seqnum, const FIX8::Message *&msg) |
|
void | push (FIX8::TEX::NewOrderSingle *nos) |
|
FIX8::TEX::NewOrderSingle * | pop () |
|
bool | cached () const |
|
int | size () const |
|
F8API | Session (const F8MetaCntx &ctx, const SessionID &sid, Persister *persist=nullptr, Logger *logger=nullptr, Logger *plogger=nullptr) |
|
F8API | Session (const F8MetaCntx &ctx, const sender_comp_id &sci=sender_comp_id(), Persister *persist=nullptr, Logger *logger=nullptr, Logger *plogger=nullptr) |
|
virtual F8API | ~Session () |
| Dtor. More...
|
|
F8API int | start (Connection *connection, bool wait=true, const unsigned send_seqnum=0, const unsigned recv_seqnum=0, const f8String davi=f8String()) |
|
void | clear_connection (const Connection *connection) |
|
virtual F8API bool | process (const f8String &from) |
|
virtual F8API bool | retrans_callback (const SequencePair &with, RetransmissionContext &rctx) |
|
virtual F8API bool | send (Message *msg, bool destroy=true, const unsigned custom_seqnum=0, const bool no_increment=false) |
|
virtual F8API bool | send (Message &msg, const unsigned custom_seqnum=0, const bool no_increment=false) |
|
virtual F8API size_t | send_batch (const std::vector< Message * > &msgs, bool destroy=true) |
|
F8API bool | send_process (Message *msg) |
|
virtual F8API int | modify_header (MessageBase *msg) |
|
F8API void | update_persist_seqnums () |
| Force persister to sync next send/receive seqnums. More...
|
|
F8API void | stop () |
| stop the session. More...
|
|
Connection * | get_connection () |
|
Timer< Session > & | get_timer () |
|
const F8MetaCntx & | get_ctx () const |
|
bool | is_loggable (Logger::Level level) const |
|
bool | enqueue (const std::string &what, Logger::Level lev, const char *fl=nullptr, unsigned value=0) const |
|
bool | log (const std::string &what, Logger::Level lev, const char *fl=nullptr, unsigned value=0) const |
|
bool | plog (const std::string &what, Logger::Level lev, const unsigned direction=0) const |
|
const Tickval & | get_last_received () const |
|
const Tickval & | get_last_sent () const |
|
void | update_sent () |
| Update the last sent time. More...
|
|
void | update_received () |
| Update the last received time. More...
|
|
F8API void | compid_check (const unsigned seqnum, const Message *msg, const SessionID &id) const |
|
F8API bool | sequence_check (const unsigned seqnum, const Message *msg) |
|
virtual bool | activation_check (const unsigned seqnum, const Message *msg) |
|
F8API bool | enforce (const unsigned seqnum, const Message *msg) |
|
const SessionID & | get_sid () const |
|
unsigned | get_next_send_seq () const |
|
void | set_login_parameters (const LoginParameters &loginParamaters) |
|
void | get_login_parameters (LoginParameters &loginParamaters) const |
|
const LoginParameters & | get_login_parameters () const |
|
void | set_reset_sequence_numbers_flag (bool flag) |
|
void | set_persister (Persister *pst) |
|
Control & | control () |
|
bool | is_shutdown () |
|
void | set_session_config (struct SessionConfig *sf) |
|
virtual F8API Message * | generate_logout (const char *msgstr=nullptr) |
|
virtual F8API Message * | generate_heartbeat (const f8String &testReqID) |
|
virtual F8API Message * | generate_resend_request (const unsigned begin, const unsigned end=0) |
|
virtual F8API Message * | generate_sequence_reset (const unsigned newseqnum, const bool gapfillflag=false) |
|
virtual F8API Message * | generate_test_request (const f8String &testReqID) |
|
virtual F8API Message * | generate_reject (const unsigned seqnum, const char *what, const char *msgtype=nullptr) |
|
virtual F8API Message * | generate_business_reject (const unsigned seqnum, const Message *msg, const int reason, const char *what) |
|
void | do_state_change (const States::SessionStates new_state) |
|
States::SessionStates | get_session_state () const |
|
|
enum | SessionControl {
shutdown,
print,
printnohb,
debug,
count
} |
|
using | Control = ebitset_r< SessionControl > |
|
using | SequencePair = std::pair< const unsigned, const f8String > |
|
static const Message * | detach (const Message *&msg) |
|
static const f8String & | get_session_state_string (const States::SessionStates state) |
|
static F8API const f8String | copyright_string () |
|
F8API bool | heartbeat_service () |
| Heartbeat generation service thread method. More...
|
|
F8API bool | activation_service () |
| Session start/stop service thread method. More...
|
|
virtual F8API bool | handle_logon (const unsigned seqnum, const Message *msg) |
|
virtual F8API Message * | generate_logon (const unsigned heartbeat_interval, const f8String davi=f8String()) |
|
virtual F8API bool | handle_logout (const unsigned seqnum, const Message *msg) |
|
virtual F8API bool | handle_heartbeat (const unsigned seqnum, const Message *msg) |
|
virtual F8API bool | handle_resend_request (const unsigned seqnum, const Message *msg) |
|
virtual F8API bool | handle_sequence_reset (const unsigned seqnum, const Message *msg) |
|
virtual F8API bool | handle_test_request (const unsigned seqnum, const Message *msg) |
|
virtual bool | handle_reject (const unsigned seqnum, const Message *msg) |
|
virtual bool | handle_admin (const unsigned seqnum, const Message *msg) |
|
virtual F8API bool | handle_outbound_reject (const unsigned seqnum, const Message *msg, const char *errstr) |
|
virtual void | state_change (const States::SessionStates before, const States::SessionStates after) |
|
virtual void | modify_outbound (Message *msg) |
|
virtual bool | authenticate (SessionID &id, const Message *msg) |
|
virtual F8API void | recover_seqnums () |
| Recover next expected and next to send sequence numbers from persitence layer. More...
|
|
Message * | create_msg (const f8String &msg_type) const |
|
void | set_scheduler (int priority) |
|
void | set_affinity (int core_id) |
|
Control | _control |
|
f8_atomic< unsigned > | _next_send_seq |
|
f8_atomic< unsigned > | _next_receive_seq |
|
f8_atomic< States::SessionStates > | _state |
|
f8_atomic< bool > | _active |
|
Tickval | _last_sent |
|
Tickval | _last_received |
|
const F8MetaCntx & | _ctx |
|
sender_comp_id | _sci |
|
Connection * | _connection |
|
unsigned | _req_next_send_seq |
|
unsigned | _req_next_receive_seq |
|
SessionID | _sid |
|
struct SessionConfig * | _sf |
|
LoginParameters | _loginParameters |
|
f8_spin_lock | _per_spl |
|
Persister * | _persist |
|
Logger * | _logger |
|
Logger * | _plogger |
|
Timer< Session > | _timer |
|
TimerEvent< Session > | _hb_processor |
|
TimerEvent< Session > | _session_scheduler |
|
std::string | _batchmsgs_buffer |
|
Session_Schedule * | _schedule |
|
static F8API const std::vector< f8String > | _state_names |
| string representation of Sessionstates More...
|
|
Example client session. Derives from FIX8::Session.
Your application must define a class similar to this in order to create and connect a client. You must also implement handle_application in order to receive application messages from the framework.
Definition at line 64 of file hftest.hpp.