on_post_batch -> on_batch_complete
This commit is contained in:
@@ -107,6 +107,6 @@ public:
|
||||
*
|
||||
* @param batch A span of unique_ptrs to the connections in the batch.
|
||||
*/
|
||||
virtual void on_post_batch(std::span<std::unique_ptr<Connection>> /*batch*/) {
|
||||
}
|
||||
virtual void
|
||||
on_batch_complete(std::span<std::unique_ptr<Connection>> /*batch*/) {}
|
||||
};
|
||||
|
||||
@@ -50,7 +50,8 @@ void HttpHandler::on_write_buffer_drained(
|
||||
on_connection_established(*conn_ptr);
|
||||
}
|
||||
|
||||
void HttpHandler::on_post_batch(std::span<std::unique_ptr<Connection>> batch) {
|
||||
void HttpHandler::on_batch_complete(
|
||||
std::span<std::unique_ptr<Connection>> batch) {
|
||||
int readyCount = 0;
|
||||
for (int i = 0; i < int(batch.size()); ++i) {
|
||||
readyCount += batch[i] && batch[i]->outgoingBytesQueued() > 0;
|
||||
|
||||
@@ -103,7 +103,8 @@ struct HttpHandler : ConnectionHandler {
|
||||
void on_data_arrived(std::string_view data,
|
||||
std::unique_ptr<Connection> &conn_ptr) override;
|
||||
void on_write_buffer_drained(std::unique_ptr<Connection> &conn_ptr) override;
|
||||
void on_post_batch(std::span<std::unique_ptr<Connection>> /*batch*/) override;
|
||||
void on_batch_complete(
|
||||
std::span<std::unique_ptr<Connection>> /*batch*/) override;
|
||||
|
||||
// Route parsing (public for testing)
|
||||
static HttpRoute parseRoute(std::string_view method, std::string_view url);
|
||||
|
||||
@@ -535,8 +535,8 @@ void Server::process_connection_batch(
|
||||
}
|
||||
}
|
||||
|
||||
// Call post-batch handler - handlers can take ownership here
|
||||
handler_.on_post_batch(batch);
|
||||
// Call batch complete handler - handlers can take ownership here
|
||||
handler_.on_batch_complete(batch);
|
||||
|
||||
// Transfer all remaining connections back to epoll
|
||||
for (auto &conn_ptr : batch) {
|
||||
|
||||
Reference in New Issue
Block a user