21 #include <sys/types.h> 27 #include <arpa/inet.h> 28 #include <netinet/tcp.h> 29 #include <sys/socket.h> 38 setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (
char *) &flag,
sizeof(
int));
58 int received = recv(
Socket, data, size, MSG_WAITALL);
70 return (std::size_t)size;
75 int sent = send(
Socket, message, size, 0);
77 if (sent != (
int)size)
#define THROW_ERROR(data)
virtual std::size_t Receive(char *data, std::size_t size)
Receive data.
SocketChannel(int sock)
Opc binary cnnection channel. GNU LGPL.
#define THROW_OS_ERROR(UserMsg)
virtual void Send(const char *message, std::size_t size)