E-MailRelay

Static Public Member Functions | List of all members
G::Msg Class Reference

Wrappers for sendmsg() and recvmsg(). More...

`#include <gmsg.h>`

## Static Public Member Functions
static ssize_t | send (SOCKET, const void *, std::size_t, int flags) noexcept
| A send() replacement using sendmsg(). More...
static ssize_t | sendto (SOCKET, const void *, std::size_t, int flags, const sockaddr *, socklen_t) noexcept
| A sendto() replacement using sendmsg(). More...
static ssize_t | recv (SOCKET, void *, std::size_t, int flags)
| A recv() wrapper. More...
static ssize_t | recvfrom (SOCKET, void *, std::size_t, int flags, sockaddr *, socklen_t *)
| A recvfrom() replacement using recvmsg(). More...
static bool | fatal (int error) noexcept
| Returns true if the error value indicates a permanent problem with the socket. More...

## Detailed Description

Wrappers for sendmsg() and recvmsg().

These 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

## ◆ fatal()

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

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

Definition at line 56 of file gmsg_unix.cpp.

## ◆ recv()

ssize_t G::Msg::recv | ( | SOCKET | fd,
|  | void * | buffer,
|  | std::size_t | size,
|  | int | flags
| ) |  |
| static

A recv() wrapper.

Definition at line 45 of file gmsg_unix.cpp.

## ◆ recvfrom()

ssize_t G::Msg::recvfrom | ( | SOCKET | fd,
|  | void * | buffer,
|  | std::size_t | size,
|  | int | flags,
|  | sockaddr * | address_p,
|  | socklen_t * | address_np
| ) |  |
| static

A recvfrom() replacement using recvmsg().

Definition at line 50 of file gmsg_unix.cpp.

## ◆ send()

ssize_t G::Msg::send | ( | SOCKET | fd,
|  | const void * | buffer,
|  | std::size_t | size,
|  | int | flags
| ) |  |
| static noexcept

A send() replacement using sendmsg().

Definition at line 34 of file gmsg_unix.cpp.

## ◆ sendto()

ssize_t G::Msg::sendto | ( | SOCKET | fd,
|  | const void * | buffer,
|  | std::size_t | size,
|  | int | flags,
|  | const sockaddr * | address_p,
|  | socklen_t | address_n
| ) |  |
| static noexcept

A sendto() replacement using sendmsg().

Definition at line 39 of file gmsg_unix.cpp.

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

- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/glib/gmsg.h
- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/glib/gmsg_unix.cpp