Toolbox snapshot
The Reactive C++ Toolbox
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
toolbox::net::DgramSock Struct Reference

Connectionless Datagram Socket. All state is in base class, so object can be sliced. More...

#include <toolbox/net/DgramSock.hpp>

Inheritance diagram for toolbox::net::DgramSock:
Inheritance graph
[legend]
Collaboration diagram for toolbox::net::DgramSock:
Collaboration graph
[legend]

Public Types

using Protocol = DgramProtocol
 
using Endpoint = DgramEndpoint
 

Public Member Functions

 DgramSock (Protocol protocol, std::error_code &ec) noexcept
 
 DgramSock (Protocol protocol)
 
 DgramSock () noexcept=default
 
void get_sock_name (Endpoint &ep, std::error_code &ec) noexcept
 
void get_sock_name (Endpoint &ep)
 
void bind (const Endpoint &ep, std::error_code &ec) noexcept
 
void bind (const Endpoint &ep)
 
void connect (const Endpoint &ep, std::error_code &ec) noexcept
 
void connect (const Endpoint &ep)
 
ssize_t recvfrom (void *buf, std::size_t len, int flags, Endpoint &ep, std::error_code &ec) noexcept
 
std::size_t recvfrom (void *buf, std::size_t len, int flags, Endpoint &ep)
 
ssize_t recvfrom (MutableBuffer buf, int flags, Endpoint &ep, std::error_code &ec) noexcept
 
std::size_t recvfrom (MutableBuffer buf, int flags, Endpoint &ep)
 
ssize_t sendto (const void *buf, std::size_t len, int flags, const Endpoint &ep, std::error_code &ec) noexcept
 
std::size_t sendto (const void *buf, std::size_t len, int flags, const Endpoint &ep)
 
ssize_t sendto (ConstBuffer buf, int flags, const Endpoint &ep, std::error_code &ec) noexcept
 
std::size_t sendto (ConstBuffer buf, int flags, const Endpoint &ep)
 
 IoSock () noexcept=default
 
- Public Member Functions inherited from toolbox::net::IoSock
 IoSock () noexcept=default
 
void shutdown (int how)
 
ssize_t read (void *buf, std::size_t len, std::error_code &ec) noexcept
 
std::size_t read (void *buf, std::size_t len)
 
ssize_t read (MutableBuffer buf, std::error_code &ec) noexcept
 
std::size_t read (MutableBuffer buf)
 
ssize_t recv (void *buf, std::size_t len, int flags, std::error_code &ec) noexcept
 
std::size_t recv (void *buf, std::size_t len, int flags)
 
ssize_t recv (MutableBuffer buf, int flags, std::error_code &ec) noexcept
 
std::size_t recv (MutableBuffer buf, int flags)
 
ssize_t write (const void *buf, std::size_t len, std::error_code &ec) noexcept
 
std::size_t write (const void *buf, std::size_t len)
 
ssize_t write (ConstBuffer buf, std::error_code &ec) noexcept
 
std::size_t write (ConstBuffer buf)
 
ssize_t send (const void *buf, std::size_t len, int flags, std::error_code &ec) noexcept
 
std::size_t send (const void *buf, std::size_t len, int flags)
 
ssize_t send (ConstBuffer buf, int flags, std::error_code &ec) noexcept
 
std::size_t send (ConstBuffer buf, int flags)
 
 Sock (FileHandle &&sock, int family)
 
 Sock () noexcept=default
 
- Public Member Functions inherited from toolbox::net::Sock
 Sock (FileHandle &&sock, int family)
 
 Sock () noexcept=default
 
int family () const noexcept
 
bool is_ip_family () const noexcept
 
std::error_code get_error (std::error_code &ec) const noexcept
 
std::error_code get_error () const
 
int get_rcv_buf (std::error_code &ec) const noexcept
 
int get_rcv_buf () const
 
int get_snd_buf (std::error_code &ec) const noexcept
 
int get_snd_buf () const
 
bool is_tcp_no_delay (std::error_code &ec) const noexcept
 
bool is_tcp_no_delay () const
 
void close ()
 
void set_non_block (std::error_code &ec) noexcept
 
void set_non_block ()
 
void set_rcv_buf (int size, std::error_code &ec) noexcept
 
void set_rcv_buf (int size)
 
void set_reuse_addr (bool enabled, std::error_code &ec) noexcept
 
void set_reuse_addr (bool enabled)
 
void set_snd_buf (int size, std::error_code &ec) noexcept
 
void set_snd_buf (int size)
 

Detailed Description

Connectionless Datagram Socket. All state is in base class, so object can be sliced.

Definition at line 27 of file DgramSock.hpp.

Member Typedef Documentation

◆ Protocol

Definition at line 28 of file DgramSock.hpp.

◆ Endpoint

Definition at line 29 of file DgramSock.hpp.

Constructor & Destructor Documentation

◆ DgramSock() [1/3]

toolbox::net::DgramSock::DgramSock ( Protocol  protocol,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 33 of file DgramSock.hpp.

◆ DgramSock() [2/3]

toolbox::net::DgramSock::DgramSock ( Protocol  protocol)
inlineexplicit

Definition at line 37 of file DgramSock.hpp.

◆ DgramSock() [3/3]

toolbox::net::DgramSock::DgramSock ( )
defaultnoexcept

Member Function Documentation

◆ get_sock_name() [1/2]

void toolbox::net::DgramSock::get_sock_name ( Endpoint ep,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 44 of file DgramSock.hpp.

◆ get_sock_name() [2/2]

void toolbox::net::DgramSock::get_sock_name ( Endpoint ep)
inline

Definition at line 48 of file DgramSock.hpp.

◆ bind() [1/2]

void toolbox::net::DgramSock::bind ( const Endpoint ep,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 49 of file DgramSock.hpp.

◆ bind() [2/2]

void toolbox::net::DgramSock::bind ( const Endpoint ep)
inline

Definition at line 50 of file DgramSock.hpp.

◆ connect() [1/2]

void toolbox::net::DgramSock::connect ( const Endpoint ep,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 51 of file DgramSock.hpp.

◆ connect() [2/2]

void toolbox::net::DgramSock::connect ( const Endpoint ep)
inline

Definition at line 55 of file DgramSock.hpp.

◆ recvfrom() [1/4]

ssize_t toolbox::net::DgramSock::recvfrom ( void buf,
std::size_t  len,
int  flags,
Endpoint ep,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 57 of file DgramSock.hpp.

◆ recvfrom() [2/4]

std::size_t toolbox::net::DgramSock::recvfrom ( void buf,
std::size_t  len,
int  flags,
Endpoint ep 
)
inline

Definition at line 62 of file DgramSock.hpp.

◆ recvfrom() [3/4]

ssize_t toolbox::net::DgramSock::recvfrom ( MutableBuffer  buf,
int  flags,
Endpoint ep,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 67 of file DgramSock.hpp.

◆ recvfrom() [4/4]

std::size_t toolbox::net::DgramSock::recvfrom ( MutableBuffer  buf,
int  flags,
Endpoint ep 
)
inline

Definition at line 71 of file DgramSock.hpp.

◆ sendto() [1/4]

ssize_t toolbox::net::DgramSock::sendto ( const void buf,
std::size_t  len,
int  flags,
const Endpoint ep,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 76 of file DgramSock.hpp.

◆ sendto() [2/4]

std::size_t toolbox::net::DgramSock::sendto ( const void buf,
std::size_t  len,
int  flags,
const Endpoint ep 
)
inline

Definition at line 81 of file DgramSock.hpp.

◆ sendto() [3/4]

ssize_t toolbox::net::DgramSock::sendto ( ConstBuffer  buf,
int  flags,
const Endpoint ep,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 86 of file DgramSock.hpp.

◆ sendto() [4/4]

std::size_t toolbox::net::DgramSock::sendto ( ConstBuffer  buf,
int  flags,
const Endpoint ep 
)
inline

Definition at line 90 of file DgramSock.hpp.

◆ IoSock()

toolbox::net::IoSock::IoSock ( )
defaultnoexcept

The documentation for this struct was generated from the following file: