You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
452 B

#pragma once
#include "webserv.hpp"
class Socket {
int _master_socket;
struct sockaddr_in _address;
int _clients_amount;
std::vector<int> _clients;
public:
listen_t _listen;
static fd_set _readfds;
static int _max_fd;
static int _min_fd;
static int _amount;
Socket(string def);
~Socket();
int launch();
void set_fds();
void refresh(Env *env);
void answer(Env *env, int fd, string request);
void send_answer(int fd, string msg);
};