spoke/packet/server/outgoing
Outgoing packets for a MQTT server.
Types
Represents all the valid outgoing packets for an MQTT server.
pub type Packet {
ConnAck(Result(packet.SessionPresence, packet.ConnectError))
Publish(packet.PublishData)
PubAck(packet_id: Int)
PubRec(packet_id: Int)
PubRel(packet_id: Int)
PubComp(packet_id: Int)
SubAck(
packet_id: Int,
return_code: Result(packet.QoS, Nil),
other_return_codes: List(Result(packet.QoS, Nil)),
)
UnsubAck(packet_id: Int)
PingResp
}
Constructors
-
ConnAck(Result(packet.SessionPresence, packet.ConnectError)) -
Publish(packet.PublishData) -
PubAck(packet_id: Int) -
PubRec(packet_id: Int) -
PubRel(packet_id: Int) -
PubComp(packet_id: Int) -
SubAck( packet_id: Int, return_code: Result(packet.QoS, Nil), other_return_codes: List(Result(packet.QoS, Nil)), ) -
UnsubAck(packet_id: Int) -
PingResp
Values
pub fn encode_packet(packet: Packet) -> bytes_tree.BytesTree
Encodes a packet into its binary form.