created and set up server socket

This commit is contained in:
bettercallous
2024-04-08 11:42:37 +00:00
parent 614f631723
commit 45567b98b9
3 changed files with 52 additions and 2 deletions

View File

@@ -4,12 +4,18 @@
#include <iostream>
#include <cstdlib>
#include <csignal>
#include <arpa/inet.h>
#include <fcntl.h>
#include <vector>
#include <poll.h>
class Server {
private:
int _port;
int _serverSocketFd;
static bool _signal;
std::string _password;
std::vector<struct pollfd> _fds;
public:
Server();
~Server();
@@ -18,6 +24,10 @@ class Server {
static void receiveSignal(int signum);
void init();
void createServerSocket();
void bindServerSocket();
void addPollfd(int fd, short events, short revents);
};
#endif