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.

24 lines
468 B

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