6 #include "ITcpSocket.h"
7 #include "ITcpSocketSet.h"
10 #include <netinet/in.h>
11 #include <sys/socket.h>
12 #include <sys/types.h>
26 PosixTcpSocket(
int clientSocketDescriptor, sockaddr_in clientSocket);
29 u64 GetSocketDescriptor()
const {
return static_cast<u64
>(m_socketDescriptor); }
31 void StartListening(
int port);
33 void SetNonBlocking();
36 ITcpSocketSet* GetSocketSet(
const std::vector<ITcpSocket*>& clientSockets);
38 ssize_t Receive(
char* buffer,
size_t maxBufferLength);
39 void Send(
const char* data,
int length)
const;
45 int m_socketDescriptor;