7#ifndef YARP_OS_IMPL_POSIX_TCPSTREAM_H
8#define YARP_OS_IMPL_POSIX_TCPSTREAM_H
12#include <sys/socket.h>
13#include <netinet/in.h>
43 inline ssize_t
recv_n(
void *buf,
size_t n)
45 return ::recv(sd, buf,
n, 0);
51 return ::recv(sd, buf,
n, 0);
54 inline ssize_t
recv(
void *buf,
size_t n)
56 return ::recv(sd, buf,
n, 0);
62 return ::recv(sd, buf,
n, 0);
65 inline ssize_t
send_n(
const void *buf,
size_t n)
67 return ::send(sd, buf,
n, 0);
73 return ::send(sd, buf,
n, 0);
A mini-server for performing network communication in the background.
ssize_t recv(void *buf, size_t n, struct timeval *tv)
int set_option(int level, int option, void *optval, int optlen) const
int get_local_addr(sockaddr &)
ssize_t recv_n(void *buf, size_t n)
int get_option(int level, int option, void *optval, int *optlen) const
TcpStream()
Constructor TcpStream.
int get_remote_addr(sockaddr &)
ssize_t send_n(const void *buf, size_t n, struct timeval *tv)
virtual ~TcpStream()
Destructor ~TcpStream.
ssize_t recv(void *buf, size_t n)
ssize_t recv_n(void *buf, size_t n, struct timeval *tv)
ssize_t send_n(const void *buf, size_t n)
The main, catch-all namespace for YARP.