mqtt-0.1.1.0: An MQTT protocol implementation.

Copyright(c) Lars Petersen 2016
LicenseMIT
Maintainerinfo@lars-petersen.net
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Network.MQTT.Broker

Description

 

Synopsis

Documentation

data Broker auth Source #

newBroker :: auth -> IO (Broker auth) Source #

publishUpstream :: Broker auth -> Message -> IO () Source #

Publish a message upstream on the broker.

  • As long as the broker is not clustered upstream=downstream.
  • FUTURE NOTE: In clustering mode this shall distribute the message to other brokers or upwards when the brokers form a hierarchy.

publishDownstream :: Broker auth -> Message -> IO () Source #

Inject a message downstream into the broker. It will be delivered to all subscribed sessions within this broker instance.

withSession :: forall auth. Authenticator auth => Broker auth -> ConnectionRequest -> (RejectReason -> IO ()) -> (Session auth -> SessionPresent -> IO ()) -> IO () Source #

getSessions :: Broker auth -> IO (IntMap (Session auth)) Source #