Rename files for consistency, switch to ld build system

This commit is contained in:
flamingcow
2019-05-07 23:35:59 -07:00
parent 90ce269869
commit 9c0121b674
5 changed files with 13 additions and 12 deletions

27
server.h Normal file
View File

@@ -0,0 +1,27 @@
#pragma once
#include <functional>
#include <memory>
#include <unordered_set>
#include "request.h"
namespace firecgi {
class Server {
public:
Server(int port, const std::function<void(Request*)>& callback, int threads=1, const std::unordered_set<std::string_view>& headers={});
void Serve();
private:
void NewConn(int listen_sock, int epoll_fd);
int NewListenSock();
void ServeInt();
const int port_;
const std::function<void(Request*)> callback_;
const int threads_;
const std::unordered_set<std::string_view> headers_;
};
} // firecgi