![]() |
Toolbox snapshot
The Reactive C++ Toolbox
|
Namespaces | |
namespace | detail |
Classes | |
struct | DgramProtocol |
struct | DgramSock |
Connectionless Datagram Socket. All state is in base class, so object can be sliced. More... | |
struct | IoSock |
struct | IpMcastGroup |
struct | McastSock |
Connectionless Datagram Socket. All state is in base class, so object can be sliced. More... | |
class | RateLimit |
class | RateWindow |
RateWindow maintains a sliding window of second time buckets for the specified interval. More... | |
class | Resolver |
struct | Sock |
class | StreamAcceptor |
class | StreamConnector |
struct | StreamProtocol |
struct | StreamSockClnt |
Active Client Stream Socket. All state is in base class, so object can be sliced. More... | |
struct | StreamSockServ |
Passive Server Stream Socket. All state is in base class, so object can be sliced. More... | |
struct | TcpProtocol |
struct | UdpProtocol |
struct | UnixDgramProtocol |
struct | UnixStreamProtocol |
Typedefs | |
template<typename ProtocolT > | |
using | BasicEndpoint = boost::asio::generic::basic_endpoint< ProtocolT > |
using | DgramEndpoint = BasicEndpoint< DgramProtocol > |
using | StreamEndpoint = BasicEndpoint< StreamProtocol > |
template<typename ProtocolT > | |
using | IpEndpoint = boost::asio::ip::basic_endpoint< ProtocolT > |
using | UdpEndpoint = IpEndpoint< UdpProtocol > |
using | TcpEndpoint = IpEndpoint< TcpProtocol > |
template<typename ProtocolT > | |
using | UnixEndpoint = boost::asio::local::basic_endpoint< ProtocolT > |
using | UnixDgramEndpoint = UnixEndpoint< UnixDgramProtocol > |
using | UnixStreamEndpoint = UnixEndpoint< UnixStreamProtocol > |
using | IpAddr = boost::asio::ip::address |
using | IpAddrV4 = boost::asio::ip::address_v4 |
using | IpAddrV6 = boost::asio::ip::address_v6 |
using | AddrInfoFuture = std::future< AddrInfoPtr > |
using | AddrInfoPtr = std::unique_ptr< addrinfo, void(*)(addrinfo *)> |
using toolbox::net::BasicEndpoint = typedef boost::asio::generic::basic_endpoint<ProtocolT> |
Definition at line 33 of file Endpoint.hpp.
Definition at line 35 of file Endpoint.hpp.
Definition at line 36 of file Endpoint.hpp.
using toolbox::net::IpEndpoint = typedef boost::asio::ip::basic_endpoint<ProtocolT> |
Definition at line 39 of file Endpoint.hpp.
Definition at line 41 of file Endpoint.hpp.
Definition at line 42 of file Endpoint.hpp.
using toolbox::net::UnixEndpoint = typedef boost::asio::local::basic_endpoint<ProtocolT> |
Definition at line 45 of file Endpoint.hpp.
Definition at line 47 of file Endpoint.hpp.
Definition at line 48 of file Endpoint.hpp.
using toolbox::net::IpAddr = typedef boost::asio::ip::address |
Definition at line 24 of file IpAddr.hpp.
using toolbox::net::IpAddrV4 = typedef boost::asio::ip::address_v4 |
Definition at line 25 of file IpAddr.hpp.
using toolbox::net::IpAddrV6 = typedef boost::asio::ip::address_v6 |
Definition at line 26 of file IpAddr.hpp.
using toolbox::net::AddrInfoFuture = typedef std::future<AddrInfoPtr> |
Definition at line 30 of file Resolver.hpp.
Definition at line 31 of file Socket.hpp.
|
constexprnoexcept |
Definition at line 27 of file Endian.hpp.
Referenced by toolbox::net::detail::get_length(), and toolbox::net::detail::put_length().
|
constexprnoexcept |
Definition at line 32 of file Endian.hpp.
|
constexprnoexcept |
Definition at line 37 of file Endian.hpp.
|
constexprnoexcept |
Definition at line 42 of file Endian.hpp.
|
constexprnoexcept |
Definition at line 47 of file Endian.hpp.
|
constexprnoexcept |
Definition at line 53 of file Endian.hpp.
Definition at line 60 of file Endian.hpp.
Definition at line 71 of file Endian.hpp.
Definition at line 82 of file Endian.hpp.
Definition at line 93 of file Endian.hpp.
TOOLBOX_API AddrInfoPtr toolbox::net::parse_endpoint | ( | string_view | uri, |
int | type | ||
) |
Definition at line 59 of file Endpoint.cpp.
Referenced by toolbox::net::Resolver::resolve().
TOOLBOX_API std::istream & toolbox::net::operator>> | ( | istream & | is, |
DgramEndpoint & | ep | ||
) |
Definition at line 100 of file Endpoint.cpp.
TOOLBOX_API std::istream & toolbox::net::operator>> | ( | istream & | is, |
StreamEndpoint & | ep | ||
) |
Definition at line 109 of file Endpoint.cpp.
|
inline |
Definition at line 52 of file Endpoint.hpp.
|
inline |
Definition at line 58 of file Endpoint.hpp.
StreamT & toolbox::net::operator<< | ( | StreamT & | os, |
const T & | ep | ||
) |
Definition at line 92 of file Endpoint.hpp.
StreamT & toolbox::net::operator<< | ( | StreamT & | os, |
const T & | ep | ||
) |
Definition at line 122 of file Endpoint.hpp.
|
noexcept |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
std::size_t toolbox::net::parse_frame | ( | ConstBuffer | buf, |
FnT | fn, | ||
std::endian | net_byte_order | ||
) |
Calls the function object for each message encapsulated in a length-prefixed frame.
FnT | The type of the function object. |
buf | The input buffer. |
fn | The function object that is called for each complete message. |
net_byte_order | Endianness used for network byte order decoding. |
std::size_t toolbox::net::parse_frame | ( | std::string_view | buf, |
FnT | fn, | ||
std::endian | net_byte_order | ||
) |
Calls the function object for each message encapsulated in a length-prefixed frame.
FnT | The type of the function object. |
buf | The input buffer. |
fn | The function object that is called for each complete message. |
net_byte_order | Endianness used for network byte order decoding. |
Definition at line 100 of file IoSock.hpp.
|
inlinenoexcept |
Join a multicast group.
Definition at line 47 of file McastSock.hpp.
|
inline |
Join a multicast group.
Definition at line 58 of file McastSock.hpp.
|
inlinenoexcept |
Join a multicast group.
Definition at line 69 of file McastSock.hpp.
Join a multicast group.
Definition at line 76 of file McastSock.hpp.
|
inlinenoexcept |
Join a multicast group. The system will choose an appropriate interface if ifname is null.
Definition at line 82 of file McastSock.hpp.
Join a multicast group. The system will choose an appropriate interface if ifname is null.
Definition at line 89 of file McastSock.hpp.
|
inlinenoexcept |
Leave a multicast group.
Definition at line 95 of file McastSock.hpp.
|
inline |
Leave a multicast group.
Definition at line 106 of file McastSock.hpp.
|
inlinenoexcept |
Leave a multicast group.
Definition at line 117 of file McastSock.hpp.
Leave a multicast group.
Definition at line 124 of file McastSock.hpp.
|
inlinenoexcept |
Leave a multicast group. The system will leave on the first matching interface if ifname is null.
Definition at line 130 of file McastSock.hpp.
Leave a multicast group. The system will leave on the first matching interface if ifname is null.
Definition at line 137 of file McastSock.hpp.
|
inlinenoexcept |
Definition at line 142 of file McastSock.hpp.
Definition at line 154 of file McastSock.hpp.
|
inlinenoexcept |
Definition at line 166 of file McastSock.hpp.
Definition at line 175 of file McastSock.hpp.
|
inlinenoexcept |
Determines whether sent multicast packets should be looped back to the local sockets.
Definition at line 181 of file McastSock.hpp.
Determines whether sent multicast packets should be looped back to the local sockets.
Definition at line 194 of file McastSock.hpp.
|
inlinenoexcept |
Set or read the time-to-live value of outgoing multicast packets for this socket.
Definition at line 207 of file McastSock.hpp.
Set or read the time-to-live value of outgoing multicast packets for this socket.
Definition at line 220 of file McastSock.hpp.
TOOLBOX_API RateLimit toolbox::net::parse_rate_limit | ( | const string & | s | ) |
Definition at line 24 of file RateLimit.cpp.
TOOLBOX_API std::istream & toolbox::net::operator>> | ( | istream & | is, |
RateLimit & | rl | ||
) |
Definition at line 30 of file RateLimit.cpp.
Definition at line 61 of file RateLimit.hpp.
EndpointT toolbox::net::get_endpoint | ( | AddrInfoFuture & | future | ) |
Wait for future and convert result to endpoint.
Definition at line 69 of file Resolver.hpp.
Returns true if future is ready.
Definition at line 78 of file Resolver.hpp.
TOOLBOX_API AddrInfoPtr toolbox::net::get_unix_addrinfo | ( | string_view | path, |
int | type | ||
) |
Create an addrinfo structure for a Unix domain address.
Definition at line 35 of file Socket.cpp.
|
inlinenoexcept |
Definition at line 638 of file Socket.hpp.
Definition at line 644 of file Socket.hpp.
|
inlinenoexcept |
Definition at line 649 of file Socket.hpp.
|
inline |
Definition at line 657 of file Socket.hpp.
Definition at line 665 of file Socket.hpp.
Definition at line 673 of file Socket.hpp.
Definition at line 681 of file Socket.hpp.
Definition at line 689 of file Socket.hpp.
Definition at line 697 of file Socket.hpp.
Referenced by toolbox::net::StreamConnector< DerivedT >::connect(), and toolbox::net::StreamAcceptor< DerivedT >::~StreamAcceptor().
Definition at line 705 of file Socket.hpp.
Definition at line 713 of file Socket.hpp.
Definition at line 718 of file Socket.hpp.
|
inlinenoexcept |
Definition at line 723 of file Socket.hpp.
Definition at line 729 of file Socket.hpp.
Definition at line 735 of file Socket.hpp.
Definition at line 740 of file Socket.hpp.
|
inlinenoexcept |
Enable or disable the Nagle algorithm.
This means that segments are always sent as soon as possible, even if there is only a small amount of data. When not set, data is buffered until there is a sufficient amount to send out, thereby avoiding the frequent sending of small packets, which results in poor utilization of the network.
sockfd | The socket descriptor. |
enabled | Boolean switch to enable or disable. |
ec | Error-code set on failure. |
Definition at line 755 of file Socket.hpp.
Referenced by toolbox::net::StreamConnector< DerivedT >::connect(), and toolbox::net::StreamAcceptor< DerivedT >::~StreamAcceptor().
Enable or disable the Nagle algorithm.
This means that segments are always sent as soon as possible, even if there is only a small amount of data. When not set, data is buffered until there is a sufficient amount to send out, thereby avoiding the frequent sending of small packets, which results in poor utilization of the network.
sockfd | The socket descriptor. |
enabled | Boolean switch to enable or disable. |
Definition at line 770 of file Socket.hpp.
Set the number of SYN retransmits that TCP should send before aborting the attempt to connect.
The number of retransmits cannot exceed 255.
sockfd | The socket descriptor. |
retrans | The number of retransmits. |
ec | Error-code set on failure. |
Definition at line 783 of file Socket.hpp.
Set the number of SYN retransmits that TCP should send before aborting the attempt to connect.
The number of retransmits cannot exceed 255.
sockfd | The socket descriptor. |
retrans | The number of retransmits. |
Definition at line 794 of file Socket.hpp.
Definition at line 804 of file Socket.hpp.
Definition at line 817 of file Socket.hpp.