Use epoll facilities
This commit is contained in:
16
src/server/socket.hpp
Normal file
16
src/server/socket.hpp
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user