32 #include <tacopie/network/io_service.hpp>    33 #include <tacopie/network/tcp_client.hpp>    34 #include <tacopie/network/tcp_socket.hpp>    35 #include <tacopie/utils/typedefs.hpp>    37 #define __TACOPIE_CONNECTION_QUEUE_SIZE 1024    96   void stop(
bool wait_for_removal = 
false, 
bool recursive_wait_for_removal = 
true);
   118   const std::shared_ptr<tacopie::io_service>& 
get_io_service(
void) 
const;
   124   const std::list<std::shared_ptr<tacopie::tcp_client>>& 
get_clients(
void) 
const;
   132   void on_read_available(fd_t fd);
   140   void on_client_disconnected(
const std::shared_ptr<tcp_client>& client);
   147   std::shared_ptr<io_service> m_io_service;
   157   std::atomic<bool> m_is_running = ATOMIC_VAR_INIT(
false);
   162   std::list<std::shared_ptr<tacopie::tcp_client>> m_clients;
   167   std::mutex m_clients_mtx;
 
tcp_server & operator=(const tcp_server &)=delete
assignment operator 
void stop(bool wait_for_removal=false, bool recursive_wait_for_removal=true)
Definition: tcp_socket.hpp:38
Definition: tcp_server.hpp:45
tcp_socket & get_socket(void)
Definition: io_service.hpp:48
std::function< bool(const std::shared_ptr< tcp_client > &)> on_new_connection_callback_t
Definition: tcp_server.hpp:79
bool operator==(const tcp_server &rhs) const
const std::list< std::shared_ptr< tacopie::tcp_client > > & get_clients(void) const
const std::shared_ptr< tacopie::io_service > & get_io_service(void) const
bool operator!=(const tcp_server &rhs) const
void start(const std::string &host, std::uint32_t port, const on_new_connection_callback_t &callback=nullptr)
bool is_running(void) const