Versions in this module Expand all Collapse all v2 v2.6.6 Oct 23, 2024 v2.6.5 Jul 30, 2024 v2.6.4 May 19, 2024 v2.6.3 Apr 30, 2024 Changes in this version + const TDisconnectMqtt5DisconnectWithWillMessage v2.6.2 Apr 16, 2024 v2.6.1 Apr 1, 2024 v2.6.0 Mar 18, 2024 v2.4.6 Feb 5, 2024 v2.4.5 Jan 11, 2024 v2.4.4 Dec 22, 2023 v2.4.3 Dec 12, 2023 v2.4.2 Oct 24, 2023 v2.4.1 Oct 2, 2023 v2.4.0 Sep 8, 2023 Changes in this version + const TPubackMqtt5NotAuthorized + const TPubrecMqtt5NotAuthorized + var ErrInlineSubscriptionHandlerInvalid = Code v2.3.0 Jul 31, 2023 Changes in this version + const Auth + const Connack + const Connect + const Disconnect + const Pingreq + const Pingresp + const PropAssignedClientID + const PropAuthenticationData + const PropAuthenticationMethod + const PropContentType + const PropCorrelationData + const PropMaximumPacketSize + const PropMaximumQos + const PropMessageExpiryInterval + const PropPayloadFormat + const PropReasonString + const PropReceiveMaximum + const PropRequestProblemInfo + const PropRequestResponseInfo + const PropResponseInfo + const PropResponseTopic + const PropRetainAvailable + const PropServerKeepAlive + const PropServerReference + const PropSessionExpiryInterval + const PropSharedSubAvailable + const PropSubIDAvailable + const PropSubscriptionIdentifier + const PropTopicAlias + const PropTopicAliasMaximum + const PropUser + const PropWildcardSubAvailable + const PropWillDelayInterval + const Puback + const Pubcomp + const Publish + const Pubrec + const Pubrel + const Reserved + const Suback + const Subscribe + const TAuth + const TAuthInvalidReason + const TAuthInvalidReason2 + const TAuthMalProperties + const TAuthMalReasonCode + const TConnackAcceptedAdjustedExpiryInterval + const TConnackAcceptedMqtt5 + const TConnackAcceptedNoSession + const TConnackAcceptedSessionExists + const TConnackBadClientID + const TConnackBadProtocolVersion + const TConnackBadUsernamePassword + const TConnackBadUsernamePasswordNoSession + const TConnackDropProperties + const TConnackDropPropertiesPartial + const TConnackInvalidMinMqtt5 + const TConnackMalProperties + const TConnackMalReturnCode + const TConnackMalSessionPresent + const TConnackMinCleanMqtt5 + const TConnackMinMqtt5 + const TConnackMqtt5BadUsernamePasswordNoSession + const TConnackNotAuthorised + const TConnackProtocolViolationNoSession + const TConnackServerKeepalive + const TConnackServerUnavailable + const TConnectClean + const TConnectCleanLWT + const TConnectInvalidClientIDTooLong + const TConnectInvalidFlagNoPassword + const TConnectInvalidFlagNoUsername + const TConnectInvalidPasswordNoFlag + const TConnectInvalidPasswordNoUsername + const TConnectInvalidPasswordTooLong + const TConnectInvalidProtocolName + const TConnectInvalidProtocolVersion + const TConnectInvalidProtocolVersion2 + const TConnectInvalidReservedBit + const TConnectInvalidUsernameNoFlag + const TConnectInvalidUsernameTooLong + const TConnectInvalidWillFlagNoPayload + const TConnectInvalidWillFlagQosOutOfRange + const TConnectInvalidWillSurplusRetain + const TConnectMalClientID + const TConnectMalFixedHeader + const TConnectMalFlags + const TConnectMalKeepalive + const TConnectMalPassword + const TConnectMalProperties + const TConnectMalProtocolName + const TConnectMalProtocolVersion + const TConnectMalReservedBit + const TConnectMalUsername + const TConnectMalWillFlag + const TConnectMalWillProperties + const TConnectMalWillTopic + const TConnectMqtt31 + const TConnectMqtt311 + const TConnectMqtt5 + const TConnectMqtt5LWT + const TConnectSpecInvalidUTF80000 + const TConnectSpecInvalidUTF8D800 + const TConnectSpecInvalidUTF8DFFF + const TConnectSpecInvalidUTF8NoSkip + const TConnectUserPass + const TConnectUserPassLWT + const TConnectZeroByteUsername + const TDisconnect + const TDisconnectDropProperties + const TDisconnectMalProperties + const TDisconnectMalReasonCode + const TDisconnectMqtt5 + const TDisconnectNormalMqtt5 + const TDisconnectReceiveMaximum + const TDisconnectSecondConnect + const TDisconnectShuttingDown + const TDisconnectTakeover + const TDisconnectZeroNonZeroExpiry + const TPingreq + const TPingresp + const TPuback + const TPubackMalPacketID + const TPubackMalProperties + const TPubackMqtt5 + const TPubackUnexpectedError + const TPubcomp + const TPubcompInvalidReason + const TPubcompMalPacketID + const TPubcompMalProperties + const TPubcompMqtt5 + const TPubcompMqtt5AckNoPacket + const TPublishBasic + const TPublishBasicMqtt5 + const TPublishBasicTopicAliasOnly + const TPublishCopyBasic + const TPublishDropOversize + const TPublishDup + const TPublishInvalidExcessTopicAlias + const TPublishInvalidNoTopic + const TPublishInvalidQos0NoPacketID + const TPublishInvalidQosMustPacketID + const TPublishInvalidSurplusSubID + const TPublishInvalidSurplusWildcard + const TPublishInvalidSurplusWildcard2 + const TPublishInvalidTopicAlias + const TPublishMalPacketID + const TPublishMalProperties + const TPublishMalTopicName + const TPublishMqtt5 + const TPublishNoPayload + const TPublishQos1 + const TPublishQos1Dup + const TPublishQos1Mqtt5 + const TPublishQos1NoPayload + const TPublishQos2 + const TPublishQos2Mqtt5 + const TPublishQos2Upgraded + const TPublishRetain + const TPublishRetainMqtt5 + const TPublishSpecDenySysTopic + const TPublishSpecQos0NoPacketID + const TPublishSpecQosMustPacketID + const TPublishSubscriberIdentifier + const TPubrec + const TPubrecInvalidReason + const TPubrecMalPacketID + const TPubrecMalProperties + const TPubrecMalReasonCode + const TPubrecMqtt5 + const TPubrecMqtt5IDInUse + const TPubrel + const TPubrelInvalidReason + const TPubrelMalPacketID + const TPubrelMalProperties + const TPubrelMqtt5 + const TPubrelMqtt5AckNoPacket + const TSuback + const TSubackDeny + const TSubackInvalidFilter + const TSubackInvalidSharedNoLocal + const TSubackMalPacketID + const TSubackMalProperties + const TSubackMany + const TSubackMqtt5 + const TSubackPacketIDInUse + const TSubackUnspecifiedError + const TSubackUnspecifiedErrorMqtt5 + const TSubscribe + const TSubscribeInvalidFilter + const TSubscribeInvalidIdentifierOversize + const TSubscribeInvalidNoFilters + const TSubscribeInvalidQosMustPacketID + const TSubscribeInvalidSharedNoLocal + const TSubscribeMalPacketID + const TSubscribeMalProperties + const TSubscribeMalQos + const TSubscribeMalQosRange + const TSubscribeMalTopic + const TSubscribeMany + const TSubscribeMqtt5 + const TSubscribeRetainAsPublished + const TSubscribeRetainHandling1 + const TSubscribeRetainHandling2 + const TSubscribeSpecQosMustPacketID + const TUnsuback + const TUnsubackMalPacketID + const TUnsubackMalProperties + const TUnsubackMany + const TUnsubackMqtt5 + const TUnsubackPacketIDInUse + const TUnsubscribe + const TUnsubscribeDropProperties + const TUnsubscribeInvalidNoFilters + const TUnsubscribeInvalidQosMustPacketID + const TUnsubscribeMalPacketID + const TUnsubscribeMalProperties + const TUnsubscribeMalTopicName + const TUnsubscribeMany + const TUnsubscribeMqtt5 + const TUnsubscribeSpecQosMustPacketID + const Unsuback + const Unsubscribe + const WillProperties + var CodeContinueAuthentication = Code + var CodeDisconnect = Code + var CodeDisconnectWillMessage = Code + var CodeGrantedQos0 = Code + var CodeGrantedQos1 = Code + var CodeGrantedQos2 = Code + var CodeNoMatchingSubscribers = Code + var CodeNoSubscriptionExisted = Code + var CodeReAuthenticate = Code + var CodeSuccess = Code + var CodeSuccessIgnore = Code + var Err3ClientIdentifierNotValid = Code + var Err3NotAuthorized = Code + var Err3ServerUnavailable = Code + var Err3UnsupportedProtocolVersion = Code + var ErrAdministrativeAction = Code + var ErrBadAuthenticationMethod = Code + var ErrBadUsernameOrPassword = Code + var ErrBanned = Code + var ErrClientIdentifierNotValid = Code + var ErrClientIdentifierTooLong = Code + var ErrConnectionRateExceeded = Code + var ErrImplementationSpecificError = Code + var ErrKeepAliveTimeout = Code + var ErrMalformedBadProperty = Code + var ErrMalformedFlags = Code + var ErrMalformedInvalidUTF8 = Code + var ErrMalformedKeepalive = Code + var ErrMalformedOffsetBoolOutOfRange = Code + var ErrMalformedOffsetByteOutOfRange = Code + var ErrMalformedOffsetBytesOutOfRange = Code + var ErrMalformedOffsetUintOutOfRange = Code + var ErrMalformedPacket = Code + var ErrMalformedPacketID = Code + var ErrMalformedPassword = Code + var ErrMalformedProperties = Code + var ErrMalformedProtocolName = Code + var ErrMalformedProtocolVersion = Code + var ErrMalformedQos = Code + var ErrMalformedReasonCode = Code + var ErrMalformedSessionPresent = Code + var ErrMalformedTopic = Code + var ErrMalformedUsername = Code + var ErrMalformedUsernameOrPassword = Code + var ErrMalformedVariableByteInteger = Code + var ErrMalformedWillPayload = Code + var ErrMalformedWillProperties = Code + var ErrMalformedWillTopic = Code + var ErrMaxConnectTime = Code + var ErrMessageRateTooHigh = Code + var ErrNoValidPacketAvailable error = errors.New("no valid packet available") + var ErrNotAuthorized = Code + var ErrPacketIdentifierInUse = Code + var ErrPacketIdentifierNotFound = Code + var ErrPacketTooLarge = Code + var ErrPayloadFormatInvalid = Code + var ErrPendingClientWritesExceeded = Code + var ErrProtocolViolation = Code + var ErrProtocolViolationDupNoQos = Code + var ErrProtocolViolationFlagNoPassword = Code + var ErrProtocolViolationFlagNoUsername = Code + var ErrProtocolViolationInvalidReason = Code + var ErrProtocolViolationInvalidSharedNoLocal = Code + var ErrProtocolViolationInvalidTopic = Code + var ErrProtocolViolationNoFilters = Code + var ErrProtocolViolationNoPacketID = Code + var ErrProtocolViolationNoTopic = Code + var ErrProtocolViolationOversizeSubID = Code + var ErrProtocolViolationPasswordNoFlag = Code + var ErrProtocolViolationPasswordTooLong = Code + var ErrProtocolViolationProtocolName = Code + var ErrProtocolViolationProtocolVersion = Code + var ErrProtocolViolationQosOutOfRange = Code + var ErrProtocolViolationRequireFirstConnect = Code + var ErrProtocolViolationReservedBit = Code + var ErrProtocolViolationSecondConnect = Code + var ErrProtocolViolationSurplusPacketID = Code + var ErrProtocolViolationSurplusSubID = Code + var ErrProtocolViolationSurplusWildcard = Code + var ErrProtocolViolationUnsupportedProperty = Code + var ErrProtocolViolationUsernameNoFlag = Code + var ErrProtocolViolationUsernameTooLong = Code + var ErrProtocolViolationWillFlagNoPayload = Code + var ErrProtocolViolationWillFlagSurplusRetain = Code + var ErrProtocolViolationZeroNonZeroExpiry = Code + var ErrQosNotSupported = Code + var ErrQuotaExceeded = Code + var ErrReceiveMaximum = Code + var ErrRejectPacket = Code + var ErrRetainNotSupported = Code + var ErrServerBusy = Code + var ErrServerMoved = Code + var ErrServerShuttingDown = Code + var ErrServerUnavailable = Code + var ErrSessionTakenOver = Code + var ErrSharedSubscriptionsNotSupported = Code + var ErrSubscriptionIdentifiersNotSupported = Code + var ErrTopicAliasInvalid = Code + var ErrTopicFilterInvalid = Code + var ErrTopicNameInvalid = Code + var ErrUnspecifiedError = Code + var ErrUnsupportedProtocolVersion = Code + var ErrUseAnotherServer = Code + var ErrWildcardSubscriptionsNotSupported = Code + var PacketNames = map[byte]string + var QosCodes = map[byte]Code + var TPacketData = map[byte]TPacketCases + var V5CodesToV3 = map[Code]Code + func DecodeLength(b io.ByteReader) (n, bu int, err error) + type Code struct + Code byte + Reason string + func (c Code) Error() string + func (c Code) String() string + type ConnectParams struct + Clean bool + ClientIdentifier string + Keepalive uint16 + Password []byte + PasswordFlag bool + ProtocolName []byte + Username []byte + UsernameFlag bool + WillFlag bool + WillPayload []byte + WillProperties Properties + WillQos byte + WillRetain bool + WillTopic string + type FixedHeader struct + Dup bool + Qos byte + Remaining int + Retain bool + Type byte + func (fh *FixedHeader) Decode(hb byte) error + func (fh *FixedHeader) Encode(buf *bytes.Buffer) + type Mods struct + AllowResponseInfo bool + DisallowProblemInfo bool + MaxSize uint32 + type Packet struct + Connect ConnectParams + Created int64 + Expiry int64 + Filters Subscriptions + FixedHeader FixedHeader + Ignore bool + Mods Mods + Origin string + PacketID uint16 + Payload []byte + Properties Properties + ProtocolVersion byte + ReasonCode byte + ReasonCodes []byte + ReservedBit byte + SessionPresent bool + TopicName string + func (pk *Packet) AuthDecode(buf []byte) error + func (pk *Packet) AuthEncode(buf *bytes.Buffer) error + func (pk *Packet) AuthValidate() Code + func (pk *Packet) ConnackDecode(buf []byte) error + func (pk *Packet) ConnackEncode(buf *bytes.Buffer) error + func (pk *Packet) ConnectDecode(buf []byte) error + func (pk *Packet) ConnectEncode(buf *bytes.Buffer) error + func (pk *Packet) ConnectValidate() Code + func (pk *Packet) Copy(allowTransfer bool) Packet + func (pk *Packet) DisconnectDecode(buf []byte) error + func (pk *Packet) DisconnectEncode(buf *bytes.Buffer) error + func (pk *Packet) FormatID() string + func (pk *Packet) PingreqDecode(buf []byte) error + func (pk *Packet) PingreqEncode(buf *bytes.Buffer) error + func (pk *Packet) PingrespDecode(buf []byte) error + func (pk *Packet) PingrespEncode(buf *bytes.Buffer) error + func (pk *Packet) PubackDecode(buf []byte) error + func (pk *Packet) PubackEncode(buf *bytes.Buffer) error + func (pk *Packet) PubcompDecode(buf []byte) error + func (pk *Packet) PubcompEncode(buf *bytes.Buffer) error + func (pk *Packet) PublishDecode(buf []byte) error + func (pk *Packet) PublishEncode(buf *bytes.Buffer) error + func (pk *Packet) PublishValidate(topicAliasMaximum uint16) Code + func (pk *Packet) PubrecDecode(buf []byte) error + func (pk *Packet) PubrecEncode(buf *bytes.Buffer) error + func (pk *Packet) PubrelDecode(buf []byte) error + func (pk *Packet) PubrelEncode(buf *bytes.Buffer) error + func (pk *Packet) ReasonCodeValid() bool + func (pk *Packet) SubackDecode(buf []byte) error + func (pk *Packet) SubackEncode(buf *bytes.Buffer) error + func (pk *Packet) SubscribeDecode(buf []byte) error + func (pk *Packet) SubscribeEncode(buf *bytes.Buffer) error + func (pk *Packet) SubscribeValidate() Code + func (pk *Packet) UnsubackDecode(buf []byte) error + func (pk *Packet) UnsubackEncode(buf *bytes.Buffer) error + func (pk *Packet) UnsubscribeDecode(buf []byte) error + func (pk *Packet) UnsubscribeEncode(buf *bytes.Buffer) error + func (pk *Packet) UnsubscribeValidate() Code + type Packets struct + func NewPackets() *Packets + func (p *Packets) Add(id string, val Packet) + func (p *Packets) Delete(id string) + func (p *Packets) Get(id string) (val Packet, ok bool) + func (p *Packets) GetAll() map[string]Packet + func (p *Packets) Len() int + type Properties struct + AssignedClientID string + AuthenticationData []byte + AuthenticationMethod string + ContentType string + CorrelationData []byte + MaximumPacketSize uint32 + MaximumQos byte + MaximumQosFlag bool + MessageExpiryInterval uint32 + PayloadFormat byte + PayloadFormatFlag bool + ReasonString string + ReceiveMaximum uint16 + RequestProblemInfo byte + RequestProblemInfoFlag bool + RequestResponseInfo byte + ResponseInfo string + ResponseTopic string + RetainAvailable byte + RetainAvailableFlag bool + ServerKeepAlive uint16 + ServerKeepAliveFlag bool + ServerReference string + SessionExpiryInterval uint32 + SessionExpiryIntervalFlag bool + SharedSubAvailable byte + SharedSubAvailableFlag bool + SubIDAvailable byte + SubIDAvailableFlag bool + SubscriptionIdentifier []int + TopicAlias uint16 + TopicAliasFlag bool + TopicAliasMaximum uint16 + User []UserProperty + WildcardSubAvailable byte + WildcardSubAvailableFlag bool + WillDelayInterval uint32 + func (p *Properties) Copy(allowTransfer bool) Properties + func (p *Properties) Decode(pkt byte, b *bytes.Buffer) (n int, err error) + func (p *Properties) Encode(pkt byte, mods Mods, b *bytes.Buffer, n int) + type Subscription struct + Filter string + FwdRetainedFlag bool + Identifier int + Identifiers map[string]int + NoLocal bool + Qos byte + RetainAsPublished bool + RetainHandling byte + ShareName []string + func (s Subscription) Merge(n Subscription) Subscription + type Subscriptions []Subscription + type TPacketCase struct + ActualBytes []byte + ActualPacket *Packet + Case byte + Desc string + Expect error + FailFirst error + Group string + Isolate bool + Packet *Packet + Primary bool + RawBytes []byte + type TPacketCases []TPacketCase + func (f TPacketCases) Get(b byte) TPacketCase + type UserProperty struct + Key string + Val string