1 #ifndef ISIMUD_EXCHANGES_COMMON_EXCHANGE_CONNECTION_HPP
2 #define ISIMUD_EXCHANGES_COMMON_EXCHANGE_CONNECTION_HPP
23 #include "iso_3166_country_codes.hpp"
24 #include "iso_4217_currency_codes.hpp"
34 template<
class ClientCxn,
class EchgCxn>
35 class exchange_connection final {
38 using client_link_t=ClientCxn;
40 using client_msg_details_t=
typename client_link_t::proc_rules_t::src_msg_details_t;
42 using exchg_link_t=exchange_to_client_processor<
typename client_link_t::svr_mgr_t::session::ptr_type, EchgCxn>;
43 using exchg_to_client_proc_rules_t=
typename exchg_link_t::proc_rules_t;
45 using socket_t=
typename client_link_t::socket_t;
46 using socket_priority=
typename client_link_t::socket_priority;
47 using thread_traits=libjmmcg::
ppd::api_threading_traits<libjmmcg::
ppd::platform_api, libjmmcg::
ppd::heavyweight_threading>;
49 template<
class LatencyTimestamps>
50 exchange_connection(
typename client_link_t::ctor_args
const &client_cxn_details,
typename exchg_link_t::ctor_args
const &exchange_cxn_details, socket_priority to_exchg_priority, socket_priority to_client_priority, exchg_to_client_proc_rules_t
const &proc_rules, LatencyTimestamps ×tamps,
char const *svr_name);
63 std::atomic<
bool> exit_{
false};
67 exchg_link_t exchg_link_;
68 client_link_t client_link;
71 template<
class ClientCxn,
class EchgCxn>
inline std::ostream &
72 operator<<(
std::ostream &os, exchange_connection<ClientCxn, EchgCxn>
const &ec)
noexcept(
false);