Versions in this module Expand all Collapse all v0 v0.2.2 Oct 26, 2021 Changes in this version + const Accepted + const ErrBadRequest + const ErrNotAuthorised + const ErrRefusedBadProtocolVersion + const ErrRefusedIDRejected + const ErrRefusedServerUnavailable + const ErrRefusedbADID + type Connect struct + BatchByteThreshold int32 + BatchCountThreshold int32 + BatchDuration int32 + CleanSessFlag bool + ClientID string + InsecureFlag bool + KeepAlive int32 + Password []byte + SessKey int32 + Username string + Version int32 + func (c *Connect) FromBinary(fh FixedHeader, data []byte) + func (c *Connect) Info() Info + func (c *Connect) ToBinary() (bytes.Buffer, error) + func (c *Connect) Type() MessageType + type ConnectAcknowledge struct + ConnID int32 + Epoch int32 + ReturnCode uint8 + func (c *ConnectAcknowledge) FromBinary(fh FixedHeader, data []byte) + func (c *ConnectAcknowledge) Info() Info + func (c *ConnectAcknowledge) ToBinary() (bytes.Buffer, error) + func (c *ConnectAcknowledge) Type() MessageType + type ControlMessage struct + FlowControl FlowControl + Message []byte + MessageID uint16 + MessageType MessageType + func (c *ControlMessage) FromBinary(fh FixedHeader, data []byte) + func (c *ControlMessage) Info() Info + func (c *ControlMessage) ToBinary() (bytes.Buffer, error) + func (c *ControlMessage) Type() MessageType + type Disconnect struct + MessageID uint16 + func (d *Disconnect) FromBinary(fh FixedHeader, data []byte) + func (d *Disconnect) Info() Info + func (d *Disconnect) ToBinary() (bytes.Buffer, error) + func (d *Disconnect) Type() MessageType + type FixedHeader struct + FlowControl FlowControl + MessageLength int + MessageType MessageType + func (fh *FixedHeader) FromBinary(r io.Reader) error + type FlowControl uint8 + const ACKNOWLEDGE + const COMPLETE + const NONE + const NOTIFY + const RECEIPT + const RECEIVE + type Info struct + DeliveryMode uint8 + MessageID uint16 + type MessageType uint8 + const CONNECT + const DISCONNECT + const FLOWCONTROL + const PINGREQ + const PUBLISH + const RELAY + const SUBSCRIBE + const UNSUBSCRIBE + type Pingreq struct + func (p *Pingreq) FromBinary(fh FixedHeader, data []byte) + func (p *Pingreq) Info() Info + func (p *Pingreq) ToBinary() (bytes.Buffer, error) + func (p *Pingreq) Type() MessageType + type Publish struct + DeliveryMode uint8 + IsForwarded bool + MessageID uint16 + Messages []*PublishMessage + func (p *Publish) FromBinary(fh FixedHeader, data []byte) + func (p *Publish) Info() Info + func (p *Publish) ToBinary() (bytes.Buffer, error) + func (p *Publish) Type() MessageType + type PublishMessage struct + Payload []byte + Topic string + Ttl string + type Relay struct + IsForwarded bool + MessageID uint16 + RelayRequests []*RelayRequest + func (r *Relay) FromBinary(fh FixedHeader, data []byte) + func (r *Relay) Info() Info + func (r *Relay) ToBinary() (bytes.Buffer, error) + func (r *Relay) Type() MessageType + type RelayRequest struct + Last string + Topic string + type Subscribe struct + IsForwarded bool + MessageID uint16 + Subscriptions []*Subscription + func (s *Subscribe) FromBinary(fh FixedHeader, data []byte) + func (s *Subscribe) Info() Info + func (s *Subscribe) ToBinary() (bytes.Buffer, error) + func (s *Subscribe) Type() MessageType + type Subscription struct + Delay int32 + DeliveryMode uint8 + Topic string + type Unsubscribe struct + IsForwarded bool + MessageID uint16 + Subscriptions []*Subscription + func (u *Unsubscribe) FromBinary(fh FixedHeader, data []byte) + func (u *Unsubscribe) Info() Info + func (u *Unsubscribe) ToBinary() (bytes.Buffer, error) + func (u *Unsubscribe) Type() MessageType v0.2.2-alpha Oct 26, 2021