std::unique_ptr<Connection> -> Ref<Connection>

This commit is contained in:
2025-09-12 18:31:57 -04:00
parent 1fa3381e4b
commit de6f38694f
11 changed files with 79 additions and 92 deletions

View File

@@ -259,7 +259,7 @@ struct Connection {
* }
*
* void on_data_arrived(std::string_view data,
* std::unique_ptr<Connection>& conn_ptr) override {
* Ref<Connection>& conn_ptr) override {
* auto* state = static_cast<HttpConnectionState*>(conn_ptr->user_data);
* // Use state for protocol processing...
* }
@@ -333,6 +333,9 @@ private:
size_t epoll_index, ConnectionHandler *handler,
WeakRef<Server> server);
template <typename T, typename... Args>
friend Ref<T> make_ref(Args &&...args);
// Networking interface - only accessible by Server
int readBytes(char *buf, size_t buffer_size);
bool writeBytes();