LeftHookRoll
An HTTP/1.0 compliant web server, as specified by RFC1945
Loading...
Searching...
No Matches
ServerManager.hpp File Reference

Owns the event loop and all listening sockets. Accepts new connections, dispatches I/O events, and routes each accepted fd to the correct ServerConf via listening-fd mapping. More...

#include <map>
#include <set>
#include <deque>
#include <vector>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/epoll.h>
#include "ServerConf.hpp"
#include "Connection.hpp"
Include dependency graph for ServerManager.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SockAddrCompare
 Custom comparator for sockaddr_in to allow its use as a key in std::map. More...
 
class  ServerManager
 

Macros

#define BACKLOG   128
 
#define RECV_BUFFER_SIZE   4096
 
#define EPOLL_TIMEOUT_MS   2500
 
#define CONNECTION_TIMEOUT_S   60
 
#define CGI_TIMEOUT_S   10
 

Detailed Description

Owns the event loop and all listening sockets. Accepts new connections, dispatches I/O events, and routes each accepted fd to the correct ServerConf via listening-fd mapping.

Definition in file ServerManager.hpp.

Macro Definition Documentation

◆ BACKLOG

#define BACKLOG   128

Definition at line 20 of file ServerManager.hpp.

◆ RECV_BUFFER_SIZE

#define RECV_BUFFER_SIZE   4096

Definition at line 21 of file ServerManager.hpp.

◆ EPOLL_TIMEOUT_MS

#define EPOLL_TIMEOUT_MS   2500

Definition at line 22 of file ServerManager.hpp.

◆ CONNECTION_TIMEOUT_S

#define CONNECTION_TIMEOUT_S   60

Definition at line 23 of file ServerManager.hpp.

◆ CGI_TIMEOUT_S

#define CGI_TIMEOUT_S   10

Definition at line 24 of file ServerManager.hpp.