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

Passive Server Stream Socket. All state is in base class, so object can be sliced. More...

#include <toolbox/net/StreamSock.hpp>

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

Public Types

using Protocol = StreamProtocol
 
using Endpoint = StreamEndpoint
 

Public Member Functions

 StreamSockServ (Protocol protocol, std::error_code &ec) noexcept
 
 StreamSockServ (Protocol protocol)
 
 StreamSockServ () 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 listen (int backlog, std::error_code &ec) noexcept
 
void listen (int backlog)
 
IoSock accept (Endpoint &ep, std::error_code &ec) noexcept
 
IoSock accept (Endpoint &ep)
 
 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

Passive Server Stream Socket. All state is in base class, so object can be sliced.

Definition at line 27 of file StreamSock.hpp.

Member Typedef Documentation

◆ Protocol

Definition at line 28 of file StreamSock.hpp.

◆ Endpoint

Definition at line 29 of file StreamSock.hpp.

Constructor & Destructor Documentation

◆ StreamSockServ() [1/3]

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

Definition at line 33 of file StreamSock.hpp.

◆ StreamSockServ() [2/3]

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

Definition at line 37 of file StreamSock.hpp.

◆ StreamSockServ() [3/3]

toolbox::net::StreamSockServ::StreamSockServ ( )
defaultnoexcept

Member Function Documentation

◆ get_sock_name() [1/2]

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

Definition at line 44 of file StreamSock.hpp.

◆ get_sock_name() [2/2]

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

Definition at line 48 of file StreamSock.hpp.

◆ bind() [1/2]

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

◆ bind() [2/2]

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

Definition at line 50 of file StreamSock.hpp.

◆ listen() [1/2]

void toolbox::net::StreamSockServ::listen ( int  backlog,
std::error_code &  ec 
)
inlinenoexcept

◆ listen() [2/2]

void toolbox::net::StreamSockServ::listen ( int  backlog)
inline

Definition at line 53 of file StreamSock.hpp.

◆ accept() [1/2]

IoSock toolbox::net::StreamSockServ::accept ( Endpoint ep,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 55 of file StreamSock.hpp.

◆ accept() [2/2]

IoSock toolbox::net::StreamSockServ::accept ( Endpoint ep)
inline

Definition at line 59 of file StreamSock.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: