Use epoll facilities

This commit is contained in:
2019-06-27 21:38:32 +02:00
parent 500f64e2f9
commit 19b67484db
11 changed files with 218 additions and 206 deletions

16
src/server/socket.hpp Normal file
View File

@@ -0,0 +1,16 @@
#pragma once
#include <netinet/in.h>
#include <sys/socket.h>
#include <vector>
namespace ListeningSocket
{
int Create(sockaddr_in & socketAddress, int const connectionLimit);
}
namespace Socket
{
std::vector<char> ReadBytes(int fd, size_t limit);
size_t WriteBytes(int fd, std::vector<char> const & bytes);
}