diff options
author | Roland Reichwein <mail@reichwein.it> | 2023-02-04 19:02:53 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2023-02-04 19:02:53 +0100 |
commit | 45482c1e7f8b7dd7d55d2581469a65d9cd02b754 (patch) | |
tree | 1bb410356193e7a68ea487ba531674d7bad67d6f /whiteboard.h | |
parent | c4a1f194e79a7834a54fdbf63d73c33e434b4825 (diff) |
Async session
Diffstat (limited to 'whiteboard.h')
-rw-r--r-- | whiteboard.h | 11 |
1 files changed, 5 insertions, 6 deletions
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<boost::beast::websocket::stream<boost::asio::ip::tcp::socket>>; - 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<boost::asio::io_context> m_ioc; + std::unique_ptr<boost::asio::ip::tcp::acceptor> m_acceptor; + + void do_accept(); + void on_accept(boost::system::error_code ec, boost::asio::ip::tcp::socket socket); }; |