libjmmcg
release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
|
A class that wraps a link to an exchange. More...
#include <connection.hpp>
Public Types | |
using | msg_details_t = MsgDetails |
A type containing the details of the messages that will be sent to and received from the exchange. More... | |
using | conn_pol_t = ConnPol |
The connection policy that should be used to connect to the specified exchange. More... | |
using | ctor_args = conn_pol_t |
using | skt_mgr_t = socket_type::skt_mgr_t |
using | socket_t = skt_mgr_t::socket_t |
using | socket_priority = skt_mgr_t::socket_priority |
Public Member Functions | |
connection (conn_pol_t const &conn_pol, skt_mgr_t::socket_priority priority, std::size_t incoming_cpu) | |
Connect to the exchange using the connection policy specified. More... | |
template<class Msg > | |
std::enable_if< !std::is_same< typename boost::mpl::find< typename msg_details_t::client_to_exchange_messages_t, Msg >::type, typename boost::mpl::end< typename msg_details_t::client_to_exchange_messages_t >::type >::value, void >::type | send (Msg const &msg) |
Send a message to the specified, connected, exchange. More... | |
template<class Msg > | |
std::enable_if< !std::is_same< typename boost::mpl::find< typename msg_details_t::exchange_to_client_messages_t, Msg >::type, typename boost::mpl::end< typename msg_details_t::exchange_to_client_messages_t >::type >::value, void >::type | receive (Msg &msg) |
Receive a message from the specified, connected, exchange. More... | |
void | stop () |
skt_mgr_t::socket_t & | socket () noexcept(true) |
std::string | to_string () const noexcept(false) |
Public Attributes | |
const conn_pol_t | conn_pol_ |
A class that wraps a link to an exchange.
Definition at line 33 of file connection.hpp.
using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::connection< MsgDetails, ConnPol >::conn_pol_t = ConnPol |
The connection policy that should be used to connect to the specified exchange.
Definition at line 38 of file connection.hpp.
using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::connection< MsgDetails, ConnPol >::ctor_args = conn_pol_t |
Definition at line 39 of file connection.hpp.
using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::connection< MsgDetails, ConnPol >::msg_details_t = MsgDetails |
A type containing the details of the messages that will be sent to and received from the exchange.
Definition at line 36 of file connection.hpp.
using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::connection< MsgDetails, ConnPol >::skt_mgr_t = socket_type::skt_mgr_t |
Definition at line 40 of file connection.hpp.
using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::connection< MsgDetails, ConnPol >::socket_priority = skt_mgr_t::socket_priority |
Definition at line 42 of file connection.hpp.
using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::connection< MsgDetails, ConnPol >::socket_t = skt_mgr_t::socket_t |
Definition at line 41 of file connection.hpp.
|
inline |
Connect to the exchange using the connection policy specified.
conn_pol | The specified connection policy, that includes details of the exchange to which the link should be made. |
Definition at line 22 of file connection_impl.hpp.
References isimud::ISIMUD_VER_NAMESPACE::exchanges::common::connection< MsgDetails, ConnPol >::conn_pol_, and isimud::ISIMUD_VER_NAMESPACE::exchanges::common::connection< MsgDetails, ConnPol >::connection().
Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::common::connection< MsgDetails, ConnPol >::connection().
|
inline |
Receive a message from the specified, connected, exchange.
msg | The particular type of client-side message to receive from the connected exchange. We must know the message that should be received, as specified by the protocol. |
Definition at line 48 of file connection_impl.hpp.
|
inline |
Send a message to the specified, connected, exchange.
msg | The client-side message to send to the connected exchange. |
Definition at line 35 of file connection_impl.hpp.
|
inlinenoexcept |
Definition at line 84 of file connection.hpp.
|
inline |
Definition at line 53 of file connection_impl.hpp.
|
inlinenoexcept |
Definition at line 58 of file connection_impl.hpp.
const conn_pol_t isimud::ISIMUD_VER_NAMESPACE::exchanges::common::connection< MsgDetails, ConnPol >::conn_pol_ |
Definition at line 44 of file connection.hpp.
Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::common::connection< MsgDetails, ConnPol >::connection().