std::unique_ptr<Connection> -> Ref<Connection>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user