pub enum Protocol {
V5(Protocol),
None,
}
Expand description
Enumerated list of supported message-queue protocol.
Variants§
Implementations§
Source§impl Protocol
impl Protocol
Sourcepub fn is_listen(&self) -> bool
pub fn is_listen(&self) -> bool
Whether to launch a listener for this protocol. Broker side configuration.
Sourcepub fn to_listen_address(&self) -> SocketAddr
pub fn to_listen_address(&self) -> SocketAddr
Listen socket-address for this protocol. Broker side configuration.
Sourcepub fn to_listen_port(&self) -> u16
pub fn to_listen_port(&self) -> u16
Listen port for this protocol. Broker side configuration.
Sourcepub fn maximum_qos(&self) -> QoS
pub fn maximum_qos(&self) -> QoS
Maximum supported QoS by this protocol. Broker side configuration.
Sourcepub fn retain_available(&self) -> bool
pub fn retain_available(&self) -> bool
Whether publish-retain feature is supported by this protocol. Broker side configuration.
Sourcepub fn max_packet_size(&self) -> u32
pub fn max_packet_size(&self) -> u32
Maximum packet size allowed by this protocol. Broker side configuration.
Sourcepub fn keep_alive(&self) -> Option<u16>
pub fn keep_alive(&self) -> Option<u16>
Keep alive, in seconds, ticker supported by this protocol. Broker side configuration.
Sourcepub fn keep_alive_factor(&self) -> f32
pub fn keep_alive_factor(&self) -> f32
Keep alive factor, configured for this protocol. Broker side configuration.
Sourcepub fn topic_alias_max(&self) -> Option<u16>
pub fn topic_alias_max(&self) -> Option<u16>
Whether topic-alias feature is supported and its configuration for this protocol. Broker side configuration.
Source§impl Protocol
impl Protocol
Sourcepub fn new_ping_resp(&self, ping_req: QPacket) -> QPacket
pub fn new_ping_resp(&self, ping_req: QPacket) -> QPacket
Create a new ping-response packet.
Sourcepub fn new_pub_ack(&self, packet_id: PacketID) -> QPacket
pub fn new_pub_ack(&self, packet_id: PacketID) -> QPacket
Create a new publish acknowledge packet.
Sourcepub fn new_sub_ack(&self, sub: &QPacket, rcodes: Vec<ReasonCode>) -> QPacket
pub fn new_sub_ack(&self, sub: &QPacket, rcodes: Vec<ReasonCode>) -> QPacket
Create a new subscribe acknowledge packet.
Sourcepub fn new_unsub_ack(&self, unsub: &QPacket, rcodes: Vec<ReasonCode>) -> QPacket
pub fn new_unsub_ack(&self, unsub: &QPacket, rcodes: Vec<ReasonCode>) -> QPacket
Create a new un-subscribe acknowledge packet.