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

#include <toolbox/net/IoSock.hpp>

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

Public Member Functions

 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

Socket with IO operations. I.e. not a passive listener. All state is in base class, so object can be sliced.

Definition at line 27 of file IoSock.hpp.

Constructor & Destructor Documentation

◆ IoSock()

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

Member Function Documentation

◆ shutdown()

void toolbox::net::IoSock::shutdown ( int  how)
inline

Definition at line 32 of file IoSock.hpp.

◆ read() [1/4]

ssize_t toolbox::net::IoSock::read ( void buf,
std::size_t  len,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 34 of file IoSock.hpp.

◆ read() [2/4]

std::size_t toolbox::net::IoSock::read ( void buf,
std::size_t  len 
)
inline

Definition at line 38 of file IoSock.hpp.

◆ read() [3/4]

ssize_t toolbox::net::IoSock::read ( MutableBuffer  buf,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 40 of file IoSock.hpp.

◆ read() [4/4]

std::size_t toolbox::net::IoSock::read ( MutableBuffer  buf)
inline

Definition at line 44 of file IoSock.hpp.

◆ recv() [1/4]

ssize_t toolbox::net::IoSock::recv ( void buf,
std::size_t  len,
int  flags,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 46 of file IoSock.hpp.

◆ recv() [2/4]

std::size_t toolbox::net::IoSock::recv ( void buf,
std::size_t  len,
int  flags 
)
inline

Definition at line 50 of file IoSock.hpp.

◆ recv() [3/4]

ssize_t toolbox::net::IoSock::recv ( MutableBuffer  buf,
int  flags,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 55 of file IoSock.hpp.

◆ recv() [4/4]

std::size_t toolbox::net::IoSock::recv ( MutableBuffer  buf,
int  flags 
)
inline

Definition at line 59 of file IoSock.hpp.

◆ write() [1/4]

ssize_t toolbox::net::IoSock::write ( const void buf,
std::size_t  len,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 61 of file IoSock.hpp.

◆ write() [2/4]

std::size_t toolbox::net::IoSock::write ( const void buf,
std::size_t  len 
)
inline

Definition at line 65 of file IoSock.hpp.

◆ write() [3/4]

ssize_t toolbox::net::IoSock::write ( ConstBuffer  buf,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 67 of file IoSock.hpp.

◆ write() [4/4]

std::size_t toolbox::net::IoSock::write ( ConstBuffer  buf)
inline

Definition at line 71 of file IoSock.hpp.

◆ send() [1/4]

ssize_t toolbox::net::IoSock::send ( const void buf,
std::size_t  len,
int  flags,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 73 of file IoSock.hpp.

◆ send() [2/4]

std::size_t toolbox::net::IoSock::send ( const void buf,
std::size_t  len,
int  flags 
)
inline

Definition at line 77 of file IoSock.hpp.

◆ send() [3/4]

ssize_t toolbox::net::IoSock::send ( ConstBuffer  buf,
int  flags,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 82 of file IoSock.hpp.

◆ send() [4/4]

std::size_t toolbox::net::IoSock::send ( ConstBuffer  buf,
int  flags 
)
inline

Definition at line 86 of file IoSock.hpp.

◆ Sock() [1/2]

toolbox::net::Sock::Sock ( FileHandle &&  sock,
int  family 
)
inline

Definition at line 781 of file Socket.hpp.

◆ Sock() [2/2]

toolbox::net::Sock::Sock ( )
defaultnoexcept

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