example for new usage of poll()

This commit is contained in:
LuckyLaszlo
2022-07-20 20:19:13 +02:00
parent eb5e719750
commit cb8cc22c67
2 changed files with 85 additions and 42 deletions

View File

@@ -10,6 +10,7 @@
# include <stdexcept>
# include <unistd.h> // close
# include <iostream> // cout, cin
# include <cstring> // memset
# include <sys/socket.h> // socket, accept, listen, send, recv, bind, connect, setsockopt, getsockname
# include <netinet/in.h> // sockaddr_in
@@ -33,6 +34,7 @@ class Webserv
private:
int _socket_fd;
struct pollfd _poll_s[42]; // 42 PLACEHOLDER
std::map<std::string, std::string> _request;
std::map<std::string, std::string> _response;