Separate phases for processing existing and new connections
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "connection_handler.hpp"
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <span>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
@@ -117,7 +118,11 @@ private:
|
||||
void cleanup_resources();
|
||||
|
||||
// Helper for processing connection I/O
|
||||
bool process_connection_io(std::unique_ptr<Connection> &conn, int events);
|
||||
void process_connection_io(std::unique_ptr<Connection> &conn, int events);
|
||||
|
||||
// Helper for processing a batch of connections with their events
|
||||
void process_connection_batch(std::span<std::unique_ptr<Connection>> batch,
|
||||
std::span<const int> events, bool is_new);
|
||||
|
||||
/**
|
||||
* Called internally to return ownership to the server.
|
||||
@@ -134,4 +139,4 @@ private:
|
||||
Server &operator=(const Server &) = delete;
|
||||
Server(Server &&) = delete;
|
||||
Server &operator=(Server &&) = delete;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user