created and set up server socket
This commit is contained in:
10
Server.hpp
10
Server.hpp
@@ -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
|
Reference in New Issue
Block a user