From 45482c1e7f8b7dd7d55d2581469a65d9cd02b754 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 4 Feb 2023 19:02:53 +0100 Subject: Async session --- whiteboard.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'whiteboard.h') diff --git a/whiteboard.h b/whiteboard.h index c000e36..15d764a 100644 --- a/whiteboard.h +++ b/whiteboard.h @@ -26,11 +26,10 @@ private: ConnectionRegistry m_registry; - using connection = std::shared_ptr>; - std::string handle_request(connection& c, const std::string& request); - void notify_other_connections_diff(connection& c, const std::string& id, const Diff& diff); // notify all other id-related connections about changes - void notify_other_connections_pos(connection& c, const std::string& id); // notify all other id-related connections about changes - void do_session(boost::asio::ip::tcp::socket socket); - void storage_cleanup(); + std::unique_ptr m_ioc; + std::unique_ptr m_acceptor; + + void do_accept(); + void on_accept(boost::system::error_code ec, boost::asio::ip::tcp::socket socket); }; -- cgit v1.2.3