class version of poll ref
This commit is contained in:
@@ -33,16 +33,21 @@ class Webserv
|
||||
|
||||
void bind(in_port_t port);
|
||||
void listen(unsigned int max_connections);
|
||||
void start(int timeout);
|
||||
void start(int timeout, int bufsize);
|
||||
|
||||
private:
|
||||
int _socket_fd;
|
||||
std::map<std::string, std::string> _request;
|
||||
std::map<std::string, std::string> _response;
|
||||
|
||||
std::vector<struct pollfd> _fds;
|
||||
int _nfds;
|
||||
void _add_fd(int sd, short event);
|
||||
void _add_fd(int sd, short event);
|
||||
void _accept_connection();
|
||||
void _connect_socket(int it, int bufsize);
|
||||
void _close_fd(int it);
|
||||
|
||||
std::vector<struct pollfd> _fds;
|
||||
std::vector<struct pollfd>::iterator _it;
|
||||
std::vector<struct pollfd>::iterator _it_end;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user