net-mqtt: An MQTT Protocol Implementation.

[ bsd3, library, network, program ] [ Propose Tags ]

Please see the README on GitHub at https://github.com/dustin/mqtt#readme


[Skip to Readme]
Versions [faq] 0.1.0.0, 0.2.0.0, 0.2.1.0, 0.2.2.0, 0.2.3.0, 0.2.3.1, 0.2.4.0, 0.2.4.1
Change log Changelog.md
Dependencies async (>=2.2.1 && <2.3), attoparsec (>=0.13.2 && <0.14), base (>=4.7 && <5), binary (>=0.8.6 && <0.9), bytestring (>=0.10.8 && <0.11), conduit (>=1.3.1 && <1.4), conduit-extra (>=1.3.0 && <1.4), containers (>=0.6.0 && <0.7), net-mqtt, network-conduit-tls (>=1.3.2 && <1.4), stm (>=2.5.0 && <2.6), text (>=1.2.3 && <1.3) [details]
License BSD-3-Clause
Copyright BSD3
Author Dustin Sallings
Maintainer dustin@spy.net
Category Network
Home page https://github.com/dustin/mqtt#readme
Bug tracker https://github.com/dustin/mqtt/issues
Source repo head: git clone https://github.com/dustin/mqtt
Uploaded by dustin at Thu Jan 10 04:13:03 UTC 2019
Distributions NixOS:0.2.4.1
Executables mqtt
Downloads 562 total (135 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2019-01-10 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for net-mqtt-0.2.0.0

[back to package description]

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)