Webserv
Loading...
Searching...
No Matches
CGIHandler.hpp
Go to the documentation of this file.
1#pragma once
2
5
6namespace network {
7
8class CGIHandler : public IEventHandler {
9public:
10 CGIHandler(http::IResponseBody &body, ClientHandler &client, bool hasHeaderParsing);
11
12 void handleEvent(uint32_t events);
13 int getFd() const;
14
15private:
17
18private:
19 void handleRead();
20
21private:
24 std::string headerBuffer_;
26 int fd_;
27};
28
29} // namespace network
An abstract interface for all HTTP response body sources.
Definition ResponseBody.hpp:16
ClientHandler & client_
Definition CGIHandler.hpp:23
CGIHandler(http::IResponseBody &body, ClientHandler &client, bool hasHeaderParsing)
Definition CGIHandler.cpp:13
void handleRead()
Definition CGIHandler.cpp:29
int fd_
Definition CGIHandler.hpp:26
int getFd() const
Definition CGIHandler.cpp:18
State
Definition CGIHandler.hpp:16
@ READING_HEADERS
Definition CGIHandler.hpp:16
@ COMPLETE
Definition CGIHandler.hpp:16
@ STREAMING_BODY
Definition CGIHandler.hpp:16
http::IResponseBody & body_
Definition CGIHandler.hpp:22
std::string headerBuffer_
Definition CGIHandler.hpp:24
State state_
Definition CGIHandler.hpp:25
void handleEvent(uint32_t events)
Definition CGIHandler.cpp:20
Manages the full lifecycle of a single client connection.
Definition ClientHandler.hpp:21
IEventHandler()
Definition IEventHandler.cpp:5
Definition Request.hpp:13