26 #ifndef TCPCLIENTLIST_H 27 #define TCPCLIENTLIST_H 49 using client_ptr_t = std::shared_ptr<TcpClient>;
50 using client_map_t = std::map<defs::connection_t, client_ptr_t>;
85 size_t maxAllowedUnsentAsyncMessages = MAX_UNSENT_ASYNC_MSG_COUNT);
107 size_t maxAllowedUnsentAsyncMessages = MAX_UNSENT_ASYNC_MSG_COUNT);
142 void CloseConnections()
const;
144 void ClearConnections();
167 std::vector<defs::connection_t> GetServerList()
const;
195 size_t m_minAmountToRead{0};
205 size_t m_maxAllowedUnsentAsyncMessages{MAX_UNSENT_ASYNC_MSG_COUNT};
207 client_map_t m_clientMap{};
214 #endif // TCPCLIENTLIST_H std::function< size_t(const char_buffer_t &)> check_bytes_left_to_read_t
Typedef to bytes left to reading checking utility function object.
Definition: AsioDefines.h:288
File containing useful definitions.
std::mutex m_mutex
Mutex to make access to map thread safe.
Definition: TcpClientList.h:191
std::function< void(const char_buffer_t &)> message_received_handler_t
Typedef to message received handler function object.
Definition: AsioDefines.h:290
A class implementing a collection of bi-directional TCP clients.
Definition: TcpClientList.h:47
The core_lib namespace.
Definition: AsioDefines.h:59
eSendOption
Enumeration to control nagle algorithm.
Definition: AsioDefines.h:82
nagleOn - Send when possible.
std::pair< std::string, uint16_t > connection_t
Typedef describing a network connection as (address, port).
Definition: AsioDefines.h:152
boost_asio::io_context boost_iocontext_t
Boost IO context convenience typedef.
Definition: AsioDefines.h:46
std::vector< char > char_buffer_t
Typedef to generic char buffer based on s std::vector<char>.
Definition: AsioDefines.h:239