net-mqtt: An MQTT Protocol Implementation.

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

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


[Skip to ReadMe]

Properties

Versions0.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.0, 0.2.4.1
Change logChangelog.md
Dependenciesasync (>=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), network-uri (>=2.6.1 && <2.7), stm (>=2.5.0 && <2.6), text (>=1.2.3 && <1.3) [details]
LicenseBSD-3-Clause
CopyrightBSD3
AuthorDustin Sallings
Maintainerdustin@spy.net
CategoryNetwork
Home pagehttps://github.com/dustin/mqtt-hs#readme
Bug trackerhttps://github.com/dustin/mqtt-hs/issues
Source repositoryhead: git clone https://github.com/dustin/mqtt-hs
Executablesmqtt
UploadedThu Feb 7 05:31:18 UTC 2019 by dustin

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for net-mqtt-0.2.4.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)