Copyright | Lukas Braun 2014 |
---|---|
License | GPL-3 |
Maintainer | koomi+mqtt@hackerspace-bamberg.de |
Safe Haskell | None |
Language | Haskell2010 |
Binary encoding for MQTT messages.
- writeTo :: Handle -> Message t -> IO ()
- putMessage :: Message t -> Builder
- putMqttHeader :: MqttHeader -> Word8 -> Builder
- encodeRemaining :: Int64 -> Builder
- putBody :: MessageBody t -> Builder
- putConnect :: MessageBody CONNECT -> Builder
- putConnAck :: MessageBody CONNACK -> Builder
- putPublish :: MessageBody PUBLISH -> Builder
- putSubscribe :: MessageBody SUBSCRIBE -> Builder
- putSubAck :: MessageBody SUBACK -> Builder
- putUnsubscribe :: MessageBody UNSUBSCRIBE -> Builder
- putMsgID :: MsgID -> Builder
- putMqttText :: MqttText -> Builder
- putTopic :: Topic -> Builder
- fromQoS :: Num a => QoS -> a
- toBit :: Num a => Bool -> a
- msgType :: Num a => MessageBody t -> a
Documentation
Fixed Header
putMqttHeader :: MqttHeader -> Word8 -> Builder Source #
Build a MqttHeader
for the given message type.
encodeRemaining :: Int64 -> Builder Source #
Encode the remaining length field.
Body
putBody :: MessageBody t -> Builder Source #
Build the MessageBody
for any message type.
putConnect :: MessageBody CONNECT -> Builder Source #
putConnAck :: MessageBody CONNACK -> Builder Source #
putPublish :: MessageBody PUBLISH -> Builder Source #
Utility functions
msgType :: Num a => MessageBody t -> a Source #
Encode the type of a MessageBody
.