VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
G::Msg Class Reference

Wrappers for sendmsg() and recvmsg() that are near drop-in replacements for send()/sendto() and recv()/recvto(), but with SIGPIPE disabled and optional file-descriptor-passing capabilities. More...

#include <gmsg.h>

Static Public Member Functions

static ssize_t send (int, const void *, size_t, int, int fd_to_send=-1)
 A send() replacement using sendmsg().
 
static ssize_t sendto (int, const void *, size_t, int, const sockaddr *, socklen_t, int fd_to_send=-1)
 A sendto() replacement using sendmsg().
 
static ssize_t recv (int, void *, size_t, int, int *fd_received_p=nullptr)
 A recv() replacement using recvmsg().
 
static ssize_t recvfrom (int, void *, size_t, int, sockaddr *, socklen_t *, int *fd_received_p=nullptr)
 A recvfrom() replacement using recvmsg().
 
static bool fatal (int error)
 Returns true if the error value indicates a permanent problem with the socket. More...
 

Detailed Description

Wrappers for sendmsg() and recvmsg() that are near drop-in replacements for send()/sendto() and recv()/recvto(), but with SIGPIPE disabled and optional file-descriptor-passing capabilities.

See Also
man unix(7) and man cmsg(3)

Definition at line 37 of file gmsg.h.

Member Function Documentation

bool G::Msg::fatal ( int  error)
static

Returns true if the error value indicates a permanent problem with the socket.

Definition at line 119 of file gmsg.cpp.


The documentation for this class was generated from the following files: