Skip to content
Haskell MQTT client.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
src/Network/MQTT
test
.gitignore
Changelog.md
LICENSE
README.md
Setup.hs
TODO.org
package.yaml
stack.yaml

README.md

mqtt

An MQTT protocol implementation for Haskell.

Client Examples

Publish

main :: IO
main = do
  mc <- runClient mqttConfig{}
  publish mc "tmp/topic" "hello!" False

Subscribe

main :: IO
main = do
  mc <- runClient mqttConfig{_msgCB=Just msgReceived}
  print =<< subscribe mc [("tmp/topic1", QoS0), ("tmp/topic2", QoS0)]
  print =<< waitForClient mc   -- wait for the the client to disconnect

  where
    msgReceived _ t m = print (t,m)
You can’t perform that action at this time.