package
1.7.0
Repository: https://github.com/soedev/soelib.git
Documentation: pkg.go.dev

# Functions

NewConnackMessage creates a new CONNACK message.
NewConnectMessage creates a new CONNECT message.
NewDisconnectMessage creates a new DISCONNECT message.
NewPingreqMessage creates a new PINGREQ message.
NewPingrespMessage creates a new PINGRESP message.
NewPubackMessage creates a new PUBACK message.
NewPubcompMessage creates a new PUBCOMP message.
NewPublishMessage creates a new PUBLISH message.
NewPubrecMessage creates a new PUBREC message.
NewPubrelMessage creates a new PUBREL message.
NewSubackMessage creates a new SUBACK message.
NewSubscribeMessage creates a new SUBSCRIBE message.
NewUnsubackMessage creates a new UNSUBACK message.
NewUnsubscribeMessage creates a new UNSUBSCRIBE message.
ValidConnackError checks to see if the error is a Connack Error or not.
ValidQos checks the QoS value to see if it's valid.
ValidTopic checks the topic, which is a slice of bytes, to see if it's valid.
ValidVersion checks to see if the version is valid.

# Constants

CONNACK: Server to Client.
CONNECT: Client to Server.
Connection accepted.
DISCONNECT: Client to Server.
The data in the user name or password is malformed.
The Client identifier is correct UTF-8 but not allowed by the server.
The Server does not support the level of the MQTT protocol requested by the Client.
The Client is not authorized to connect.
The Network Connection has been made but the MQTT service is unavailable.
PINGREQ: Client to Server.
PINGRESP: Server to Client.
PUBACK: Client to Server, or Server to Client.
PUBCOMP: Client to Server, or Server to Client.
PUBLISH: Client to Server, or Server to Client.
PUBACK: Client to Server, or Server to Client.
PUBREL: Client to Server, or Server to Client.
QoS 1: At least once delivery This quality of service ensures that the message arrives at the receiver at least once.
QoS 0: At most once delivery The message is delivered according to the capabilities of the underlying network.
QoS 2: Exactly once delivery This is the highest quality of service, for use when neither loss nor duplication of messages are acceptable.
QosFailure is a return value for a subscription if there's a problem while subscribing to a specific topic.
RESERVED is a reserved value and should be considered an invalid message type.
RESERVED2 is a reserved value and should be considered an invalid message type.
SUBACK: Server to Client.
SUBSCRIBE: Client to Server.
UNSUBACK: Server to Client.
UNSUBSCRIBE: Client to Server.

# Variables

SupportedVersions is a map of the version number (0x3 or 0x4) to the version string, "MQIsdp" for 0x3, and "MQTT" for 0x4.

# Structs

The CONNACK Packet is the packet sent by the Server in response to a CONNECT Packet received from a Client.
After a Network Connection is established by a Client to a Server, the first Packet sent from the Client to the Server MUST be a CONNECT Packet [MQTT-3.1.0-1].
The DISCONNECT Packet is the final Control Packet sent from the Client to the Server.
The PINGREQ Packet is sent from a Client to the Server.
A PINGRESP Packet is sent by the Server to the Client in response to a PINGREQ Packet.
A PUBACK Packet is the response to a PUBLISH Packet with QoS level 1.
The PUBCOMP Packet is the response to a PUBREL Packet.
A PUBLISH Control Packet is sent from a Client to a Server or from Server to a Client to transport an Application Message.
No description provided by the author
A PUBREL Packet is the response to a PUBREC Packet.
A SUBACK Packet is sent by the Server to the Client to confirm receipt and processing of a SUBSCRIBE Packet.
The SUBSCRIBE Packet is sent from the Client to the Server to create one or more Subscriptions.
The UNSUBACK Packet is sent by the Server to the Client to confirm receipt of an UNSUBSCRIBE Packet.
An UNSUBSCRIBE Packet is sent by the Client to the Server, to unsubscribe from topics.

# Interfaces

Message is an interface defined for all MQTT message types.

# Type aliases

ConnackCode is the type representing the return code in the CONNACK message, returned after the initial CONNECT message.
MessageType is the type representing the MQTT packet types.