#ifndef MEMGRAPH_SERVER_HTTP_CONNECTION_HPP #define MEMGRAPH_SERVER_HTTP_CONNECTION_HPP #include "io/uv/uv.hpp" #include "httpparser.hpp" #include "request.hpp" #include "response.hpp" namespace http { template class HttpServer; template class HttpConnection { friend class HttpServer; using server_t = HttpServer; using connection_t = HttpConnection; using parser_t = HttpParser; public: HttpConnection(uv::UvLoop& loop, HttpServer& server); void close(); server_t& server; uv::TcpStream client; parser_t parser; Req request; Res response; bool keep_alive; }; } #endif