Switch to single-threaded epoll-based operation

This commit is contained in:
Ian Gulliver
2019-05-04 07:21:52 +00:00
parent 87bc2c1611
commit ac0d3e2816
8 changed files with 95 additions and 45 deletions

View File

@@ -14,10 +14,11 @@ class FastCGIConn {
FastCGIConn(int sock, const sockaddr_in6& client_addr, const std::function<void(std::unique_ptr<FastCGIRequest>)>& callback, const std::unordered_set<std::string_view>& headers);
~FastCGIConn();
void Serve();
[[nodiscard]] bool Read();
[[nodiscard]] bool Write(const std::vector<iovec>& vecs);
[[nodiscard]] int Sock();
private:
const int sock_;
const std::function<void(std::unique_ptr<FastCGIRequest>)>& callback_;