async_mqtt 5.0.0
|
#include <packet_variant.hpp>
Public Member Functions | |
template<typename Packet , std::enable_if_t< !std::is_same_v< std::decay_t< Packet >, basic_packet_variant< PacketIdBytes > > > * = nullptr> | |
basic_packet_variant (Packet &&packet) | |
constructor | |
template<typename Func > | |
auto | visit (Func &&func) const & |
visit to variant | |
template<typename Func > | |
auto | visit (Func &&func) & |
visit to variant | |
template<typename Func > | |
auto | visit (Func &&func) && |
visit to variant | |
template<typename T > | |
decltype(auto) | get () |
Get by type. If not match, then throw std::bad_variant_access exception. | |
template<typename T > | |
decltype(auto) | get () const |
Get by type. If not match, then throw std::bad_variant_access exception. | |
template<typename T > | |
decltype(auto) | get_if () |
Get by type pointer. | |
template<typename T > | |
decltype(auto) | get_if () const |
Get by type pointer. | |
optional< control_packet_type > | type () const |
Get control_packet_type. | |
std::vector< as::const_buffer > | const_buffer_sequence () const |
Create const buffer sequence it is for boost asio APIs. | |
Related Symbols | |
(Note that these are not member symbols.) | |
using | packet_variant = basic_packet_variant<2> |
type alias of basic_packet_variant (PacketIdBytes=2). | |
@breif The varaint type of all packets and system_error
|
inline |
constructor
packet | packet |
|
inline |
Create const buffer sequence it is for boost asio APIs.
|
inline |
Get by type. If not match, then throw std::bad_variant_access exception.
|
inline |
Get by type. If not match, then throw std::bad_variant_access exception.
|
inline |
Get by type pointer.
|
inline |
Get by type pointer.
|
inline |
Get control_packet_type.
|
inline |
visit to variant
func | Visitor function |
|
inline |
visit to variant
func | Visitor function |
|
inline |
visit to variant
func | Visitor function |
|
related |
type alias of basic_packet_variant (PacketIdBytes=2).
Role | role for packet sendable checking |
NextLayer | Just next layer for basic_endpoint. mqtt, mqtts, ws, and wss are predefined. |