Add on_write_progress

This commit is contained in:
2025-08-19 14:23:17 -04:00
parent c95aecfe8c
commit ecfb7f3307
6 changed files with 42 additions and 14 deletions

View File

@@ -35,11 +35,17 @@ public:
* - If ownership is taken, handler must call Server::releaseBackToServer()
* when done
* @note `data` is *not* owned by the connection arena, and its lifetime ends
* after the call to process_data.
* after the call to on_data_arrived.
* @note May be called from an arbitrary network thread.
*/
virtual void process_data(std::string_view data,
std::unique_ptr<Connection> &conn_ptr) = 0;
virtual void on_data_arrived(std::string_view data,
std::unique_ptr<Connection> &conn_ptr) = 0;
/**
* Successfully wrote data on the connection.
* @note May be called from an arbitrary network thread.
*/
virtual void on_write_progress(std::unique_ptr<Connection> &) {}
/**
* Called when a new connection is established.