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.

35 lines
635 B

#pragma once
#include "webserv.hpp"
class Socket {
2 years ago
Server *_server;
string _ip;
int _port;
int _master_socket;
struct sockaddr_in _address;
int _clients_amount;
std::vector<int> _clients;
public:
static fd_set _readfds;
2 years ago
static int _max_fd;
static int _min_fd;
static int _amount;
Socket(Server *server, string def);
~Socket();
int launch();
2 years ago
void set_fds();
void refresh();
void answer(int fd, string request);
void send_answer(int fd, string msg);
/*
Socket& operator=(Socket &src) {
_ip = src._ip;
_port = src._port;
_master_socket = src._master_socket;
_address = src._address;
return src;
}
*/
};