18 #ifndef CONNECTIONPOOL_HPP_ 19 #define CONNECTIONPOOL_HPP_ 24 #include <shared_mutex> 42 TEST_VIRTUAL
void add(std::weak_ptr<Connection> connection);
43 TEST_VIRTUAL
void remove(
const std::weak_ptr<Connection> &connection);
44 TEST_VIRTUAL
void send(std::unique_ptr<const Packet> packet);
47 std::set<std::weak_ptr<Connection>,
48 std::owner_less<std::weak_ptr<Connection>>> connections_;
49 std::shared_mutex mutex_;
53 #endif // CONNECTIONPOOL_HPP_
TEST_VIRTUAL void send(std::unique_ptr< const Packet > packet)
TEST_VIRTUAL ~ConnectionPool()=default
TEST_VIRTUAL void add(std::weak_ptr< Connection > connection)