std::unique_ptr<Connection> -> Ref<Connection>
This commit is contained in:
@@ -106,7 +106,7 @@ struct Server {
|
||||
*
|
||||
* @param connection unique_ptr to the connection being released back
|
||||
*/
|
||||
static void release_back_to_server(std::unique_ptr<Connection> connection);
|
||||
static void release_back_to_server(Ref<Connection> connection);
|
||||
|
||||
private:
|
||||
friend struct Connection;
|
||||
@@ -158,14 +158,11 @@ private:
|
||||
int get_epoll_for_thread(int thread_id) const;
|
||||
|
||||
// Helper for processing connection I/O
|
||||
void process_connection_reads(std::unique_ptr<Connection> &conn_ptr,
|
||||
int events);
|
||||
void process_connection_writes(std::unique_ptr<Connection> &conn_ptr,
|
||||
int events);
|
||||
void process_connection_reads(Ref<Connection> &conn_ptr, int events);
|
||||
void process_connection_writes(Ref<Connection> &conn_ptr, int events);
|
||||
|
||||
// Helper for processing a batch of connections with their events
|
||||
void process_connection_batch(int epollfd,
|
||||
std::span<std::unique_ptr<Connection>> batch,
|
||||
void process_connection_batch(int epollfd, std::span<Ref<Connection>> batch,
|
||||
std::span<const int> events);
|
||||
|
||||
/**
|
||||
@@ -176,7 +173,7 @@ private:
|
||||
*
|
||||
* @param connection Unique pointer to the connection being released back
|
||||
*/
|
||||
void receiveConnectionBack(std::unique_ptr<Connection> connection);
|
||||
void receiveConnectionBack(Ref<Connection> connection);
|
||||
|
||||
// Make non-copyable and non-movable
|
||||
Server(const Server &) = delete;
|
||||
|
||||
Reference in New Issue
Block a user