Probably going to merge accept and network threads

This commit is contained in:
2025-08-20 16:24:09 -04:00
parent 24a1157f0d
commit 7e28e6503d
6 changed files with 166 additions and 72 deletions

View File

@@ -37,14 +37,14 @@ public:
* when done
* @note `data` is *not* owned by the connection arena, and its lifetime ends
* after the call to on_data_arrived.
* @note May be called from an arbitrary network thread.
* @note May be called from an arbitrary server thread.
*/
virtual void on_data_arrived(std::string_view /*data*/,
std::unique_ptr<Connection> &) {};
/**
* Successfully wrote data on the connection.
* @note May be called from an arbitrary network thread.
* @note May be called from an arbitrary server thread.
*/
virtual void on_write_progress(std::unique_ptr<Connection> &) {}
@@ -55,7 +55,7 @@ public:
*
* Use this for:
* - Connection-specific initialization.
* @note May be called from an arbitrary accept thread.
* @note May be called from an arbitrary server thread.
*/
virtual void on_connection_established(Connection &) {}
@@ -66,7 +66,7 @@ public:
*
* Use this for:
* - Cleanup of connection-specific resources.
* @note May be called from an arbitrary accept thread.
* @note May be called from an arbitrary server thread.
*/
virtual void on_connection_closed(Connection &) {}