# Functions
NewControlPacket is used to create a new ControlPacket of the type specifiedby packetType, this is usually done by reference to the packet type constantsdefined in packets.go.
NewControlPacketWithHeader is used to create a new ControlPacket of the typespecified within the FixedHeader that is passed to the function.The newly created ControlPacket is empty and a pointer is returned.
ReadPacket takes an instance of an io.Reader (such as net.Conn) and attemptsto read an MQTT packet from the stream.
# Constants
Below are the const definitions for error codes returned byConnect().
Below are the constants assigned to each of the MQTT packet types.
Below are the constants assigned to each of the MQTT packet types.
Below are the constants assigned to each of the MQTT packet types.
Below are the const definitions for error codes returned byConnect().
Below are the const definitions for error codes returned byConnect().
Below are the const definitions for error codes returned byConnect().
Below are the const definitions for error codes returned byConnect().
Below are the const definitions for error codes returned byConnect().
Below are the const definitions for error codes returned byConnect().
Below are the const definitions for error codes returned byConnect().
Below are the constants assigned to each of the MQTT packet types.
Below are the constants assigned to each of the MQTT packet types.
Below are the constants assigned to each of the MQTT packet types.
Below are the constants assigned to each of the MQTT packet types.
Below are the constants assigned to each of the MQTT packet types.
Below are the constants assigned to each of the MQTT packet types.
Below are the constants assigned to each of the MQTT packet types.
Below are the constants assigned to each of the MQTT packet types.
Below are the constants assigned to each of the MQTT packet types.
Below are the constants assigned to each of the MQTT packet types.
Below are the constants assigned to each of the MQTT packet types.
# Variables
ConnackReturnCodes is a map of the error codes constants for Connect()to a string representation of the error.
ConnErrors is a map of the errors codes constants for Connect()to a Go error.
PacketNames maps the constants for each of the MQTT packet typesto a string representation of their name.
# Structs
ConnackPacket is an internal representation of the fields of theConnack MQTT packet.
ConnectPacket is an internal representation of the fields of theConnect MQTT packet.
Details struct returned by the Details() function called onControlPackets to present details of the Qos and MessageIDof the ControlPacket.
DisconnectPacket is an internal representation of the fields of theDisconnect MQTT packet.
FixedHeader is a struct to hold the decoded information fromthe fixed header of an MQTT ControlPacket.
PingreqPacket is an internal representation of the fields of thePingreq MQTT packet.
PingrespPacket is an internal representation of the fields of thePingresp MQTT packet.
PubackPacket is an internal representation of the fields of thePuback MQTT packet.
PubcompPacket is an internal representation of the fields of thePubcomp MQTT packet.
PublishPacket is an internal representation of the fields of thePublish MQTT packet.
PubrecPacket is an internal representation of the fields of thePubrec MQTT packet.
PubrelPacket is an internal representation of the fields of thePubrel MQTT packet.
SubackPacket is an internal representation of the fields of theSuback MQTT packet.
SubscribePacket is an internal representation of the fields of theSubscribe MQTT packet.
UnsubackPacket is an internal representation of the fields of theUnsuback MQTT packet.
UnsubscribePacket is an internal representation of the fields of theUnsubscribe MQTT packet.
# Interfaces
ControlPacket defines the interface for structs intended to holddecoded MQTT packets, either from being read or before beingwritten.