Versions in this module Expand all Collapse all v1 v1.1.1 Mar 15, 2018 v1.1.0 Aug 1, 2017 Changes in this version type ConnackPacket + SessionPresent bool type ConnectPacket + Keepalive uint16 type SubackPacket + ReturnCodes []byte v1.0.0 Jun 9, 2016 v0 v0.9.1 Mar 23, 2015 v0.9.0 Mar 23, 2015 Changes in this version + const Accepted + const Connack + const Connect + const Disconnect + const ErrNetworkError + const ErrProtocolViolation + const ErrRefusedBadProtocolVersion + const ErrRefusedBadUsernameOrPassword + const ErrRefusedIDRejected + const ErrRefusedNotAuthorised + const ErrRefusedServerUnavailable + const Pingreq + const Pingresp + const Puback + const Pubcomp + const Publish + const Pubrec + const Pubrel + const Suback + const Subscribe + const Unsuback + const Unsubscribe + var ConnErrors = map[byte]error + var ConnackReturnCodes = map[uint8]string + var PacketNames = map[uint8]string + type ConnackPacket struct + ReturnCode byte + TopicNameCompression byte + func (ca *ConnackPacket) Details() Details + func (ca *ConnackPacket) String() string + func (ca *ConnackPacket) UUID() uuid.UUID + func (ca *ConnackPacket) Unpack(b io.Reader) + func (ca *ConnackPacket) Write(w io.Writer) error + type ConnectPacket struct + CleanSession bool + ClientIdentifier string + KeepaliveTimer uint16 + Password []byte + PasswordFlag bool + ProtocolName string + ProtocolVersion byte + ReservedBit byte + Username string + UsernameFlag bool + WillFlag bool + WillMessage []byte + WillQos byte + WillRetain bool + WillTopic string + func (c *ConnectPacket) Details() Details + func (c *ConnectPacket) String() string + func (c *ConnectPacket) UUID() uuid.UUID + func (c *ConnectPacket) Unpack(b io.Reader) + func (c *ConnectPacket) Validate() byte + func (c *ConnectPacket) Write(w io.Writer) error + type ControlPacket interface + Details func() Details + String func() string + UUID func() uuid.UUID + Unpack func(io.Reader) + Write func(io.Writer) error + func NewControlPacket(packetType byte) (cp ControlPacket) + func NewControlPacketWithHeader(fh FixedHeader) (cp ControlPacket) + func ReadPacket(r io.Reader) (cp ControlPacket, err error) + type Details struct + MessageID uint16 + Qos byte + type DisconnectPacket struct + func (d *DisconnectPacket) Details() Details + func (d *DisconnectPacket) String() string + func (d *DisconnectPacket) UUID() uuid.UUID + func (d *DisconnectPacket) Unpack(b io.Reader) + func (d *DisconnectPacket) Write(w io.Writer) error + type FixedHeader struct + Dup bool + MessageType byte + Qos byte + RemainingLength int + Retain bool + func (fh FixedHeader) String() string + type PingreqPacket struct + func (pr *PingreqPacket) Details() Details + func (pr *PingreqPacket) String() string + func (pr *PingreqPacket) UUID() uuid.UUID + func (pr *PingreqPacket) Unpack(b io.Reader) + func (pr *PingreqPacket) Write(w io.Writer) error + type PingrespPacket struct + func (pr *PingrespPacket) Details() Details + func (pr *PingrespPacket) String() string + func (pr *PingrespPacket) UUID() uuid.UUID + func (pr *PingrespPacket) Unpack(b io.Reader) + func (pr *PingrespPacket) Write(w io.Writer) error + type PubackPacket struct + MessageID uint16 + func (pa *PubackPacket) Details() Details + func (pa *PubackPacket) String() string + func (pa *PubackPacket) UUID() uuid.UUID + func (pa *PubackPacket) Unpack(b io.Reader) + func (pa *PubackPacket) Write(w io.Writer) error + type PubcompPacket struct + MessageID uint16 + func (pc *PubcompPacket) Details() Details + func (pc *PubcompPacket) String() string + func (pc *PubcompPacket) UUID() uuid.UUID + func (pc *PubcompPacket) Unpack(b io.Reader) + func (pc *PubcompPacket) Write(w io.Writer) error + type PublishPacket struct + MessageID uint16 + Payload []byte + TopicName string + func (p *PublishPacket) Copy() *PublishPacket + func (p *PublishPacket) Details() Details + func (p *PublishPacket) String() string + func (p *PublishPacket) UUID() uuid.UUID + func (p *PublishPacket) Unpack(b io.Reader) + func (p *PublishPacket) Write(w io.Writer) error + type PubrecPacket struct + MessageID uint16 + func (pr *PubrecPacket) Details() Details + func (pr *PubrecPacket) String() string + func (pr *PubrecPacket) UUID() uuid.UUID + func (pr *PubrecPacket) Unpack(b io.Reader) + func (pr *PubrecPacket) Write(w io.Writer) error + type PubrelPacket struct + MessageID uint16 + func (pr *PubrelPacket) Details() Details + func (pr *PubrelPacket) String() string + func (pr *PubrelPacket) UUID() uuid.UUID + func (pr *PubrelPacket) Unpack(b io.Reader) + func (pr *PubrelPacket) Write(w io.Writer) error + type SubackPacket struct + GrantedQoss []byte + MessageID uint16 + func (sa *SubackPacket) Details() Details + func (sa *SubackPacket) String() string + func (sa *SubackPacket) UUID() uuid.UUID + func (sa *SubackPacket) Unpack(b io.Reader) + func (sa *SubackPacket) Write(w io.Writer) error + type SubscribePacket struct + MessageID uint16 + Qoss []byte + Topics []string + func (s *SubscribePacket) Details() Details + func (s *SubscribePacket) String() string + func (s *SubscribePacket) UUID() uuid.UUID + func (s *SubscribePacket) Unpack(b io.Reader) + func (s *SubscribePacket) Write(w io.Writer) error + type UnsubackPacket struct + MessageID uint16 + func (ua *UnsubackPacket) Details() Details + func (ua *UnsubackPacket) String() string + func (ua *UnsubackPacket) UUID() uuid.UUID + func (ua *UnsubackPacket) Unpack(b io.Reader) + func (ua *UnsubackPacket) Write(w io.Writer) error + type UnsubscribePacket struct + MessageID uint16 + Topics []string + func (u *UnsubscribePacket) Details() Details + func (u *UnsubscribePacket) String() string + func (u *UnsubscribePacket) UUID() uuid.UUID + func (u *UnsubscribePacket) Unpack(b io.Reader) + func (u *UnsubscribePacket) Write(w io.Writer) error