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

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

#include <toolbox/net/McastSock.hpp>

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

Public Types

using Protocol = UdpProtocol
 
using Endpoint = UdpEndpoint
 

Public Member Functions

 McastSock (Protocol protocol, std::error_code &ec) noexcept
 
 McastSock (Protocol protocol)
 
 McastSock () 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)
 
void join_group (const IpAddr &addr, unsigned ifindex, std::error_code &ec) noexcept
 
void join_group (const IpAddr &addr, unsigned ifindex)
 
void join_group (const IpAddr &addr, const char *ifname, std::error_code &ec) noexcept
 
void join_group (const IpAddr &addr, const char *ifname)
 
void leave_group (const IpAddr &addr, unsigned ifindex, std::error_code &ec) noexcept
 
void leave_group (const IpAddr &addr, unsigned ifindex)
 
void leave_group (const IpAddr &addr, const char *ifname, std::error_code &ec) noexcept
 
void leave_group (const IpAddr &addr, const char *ifname)
 
void set_ip_mcast_if (const char *ifname, std::error_code &ec) noexcept
 
void set_ip_mcast_if (const char *ifname)
 
void set_ip_mcast_loop (bool enabled, std::error_code &ec) noexcept
 
void set_ip_mcast_loop (bool enabled)
 
void set_ip_mcast_ttl (int ttl, std::error_code &ec) noexcept
 
void set_ip_mcast_ttl (int ttl)
 
 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 233 of file McastSock.hpp.

Member Typedef Documentation

◆ Protocol

Definition at line 234 of file McastSock.hpp.

◆ Endpoint

Definition at line 235 of file McastSock.hpp.

Constructor & Destructor Documentation

◆ McastSock() [1/3]

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

Definition at line 239 of file McastSock.hpp.

◆ McastSock() [2/3]

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

Definition at line 243 of file McastSock.hpp.

◆ McastSock() [3/3]

toolbox::net::McastSock::McastSock ( )
defaultnoexcept

Member Function Documentation

◆ get_sock_name() [1/2]

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

Definition at line 250 of file McastSock.hpp.

◆ get_sock_name() [2/2]

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

Definition at line 254 of file McastSock.hpp.

◆ bind() [1/2]

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

Definition at line 255 of file McastSock.hpp.

◆ bind() [2/2]

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

Definition at line 256 of file McastSock.hpp.

◆ connect() [1/2]

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

Definition at line 257 of file McastSock.hpp.

◆ connect() [2/2]

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

Definition at line 261 of file McastSock.hpp.

◆ recvfrom() [1/4]

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

Definition at line 263 of file McastSock.hpp.

◆ recvfrom() [2/4]

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

Definition at line 268 of file McastSock.hpp.

◆ recvfrom() [3/4]

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

Definition at line 273 of file McastSock.hpp.

◆ recvfrom() [4/4]

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

Definition at line 277 of file McastSock.hpp.

◆ sendto() [1/4]

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

Definition at line 282 of file McastSock.hpp.

◆ sendto() [2/4]

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

Definition at line 287 of file McastSock.hpp.

◆ sendto() [3/4]

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

Definition at line 292 of file McastSock.hpp.

◆ sendto() [4/4]

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

Definition at line 296 of file McastSock.hpp.

◆ join_group() [1/4]

void toolbox::net::McastSock::join_group ( const IpAddr addr,
unsigned  ifindex,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 301 of file McastSock.hpp.

◆ join_group() [2/4]

void toolbox::net::McastSock::join_group ( const IpAddr addr,
unsigned  ifindex 
)
inline

Definition at line 305 of file McastSock.hpp.

◆ join_group() [3/4]

void toolbox::net::McastSock::join_group ( const IpAddr addr,
const char ifname,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 310 of file McastSock.hpp.

◆ join_group() [4/4]

void toolbox::net::McastSock::join_group ( const IpAddr addr,
const char ifname 
)
inline

Definition at line 314 of file McastSock.hpp.

◆ leave_group() [1/4]

void toolbox::net::McastSock::leave_group ( const IpAddr addr,
unsigned  ifindex,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 319 of file McastSock.hpp.

◆ leave_group() [2/4]

void toolbox::net::McastSock::leave_group ( const IpAddr addr,
unsigned  ifindex 
)
inline

Definition at line 323 of file McastSock.hpp.

◆ leave_group() [3/4]

void toolbox::net::McastSock::leave_group ( const IpAddr addr,
const char ifname,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 328 of file McastSock.hpp.

◆ leave_group() [4/4]

void toolbox::net::McastSock::leave_group ( const IpAddr addr,
const char ifname 
)
inline

Definition at line 332 of file McastSock.hpp.

◆ set_ip_mcast_if() [1/2]

void toolbox::net::McastSock::set_ip_mcast_if ( const char ifname,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 337 of file McastSock.hpp.

◆ set_ip_mcast_if() [2/2]

void toolbox::net::McastSock::set_ip_mcast_if ( const char ifname)
inline

Definition at line 341 of file McastSock.hpp.

◆ set_ip_mcast_loop() [1/2]

void toolbox::net::McastSock::set_ip_mcast_loop ( bool  enabled,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 346 of file McastSock.hpp.

◆ set_ip_mcast_loop() [2/2]

void toolbox::net::McastSock::set_ip_mcast_loop ( bool  enabled)
inline

Definition at line 350 of file McastSock.hpp.

◆ set_ip_mcast_ttl() [1/2]

void toolbox::net::McastSock::set_ip_mcast_ttl ( int  ttl,
std::error_code &  ec 
)
inlinenoexcept

Definition at line 355 of file McastSock.hpp.

◆ set_ip_mcast_ttl() [2/2]

void toolbox::net::McastSock::set_ip_mcast_ttl ( int  ttl)
inline

Definition at line 359 of file McastSock.hpp.

◆ IoSock()

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

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