Readme for zeromq3-haskell-0.4

Current status

This software currently has beta status, i.e. it had seen limited testing.

Version 0.4 - Return Async a in System.ZMQ3.Monadic.async. Also require
Data.List.NonEmpty in System.ZMQ3.sendMulti.

Version 0.3 - Add monadic layer on top of System.ZMQ3 and substitute
String for ByteString in a number of cases, where the 0MQ
API speaks of "binary data", i.e. subscribe/unsubscribe,
identity/setIdentity and setTcpAcceptFilter.

Version 0.1.1 - Include better error message when trying to build against
invalid 0MQ version.

Version 0.1 - First release to provide bindings against 0MQ 3.1.0

Installation

As usual for Haskell packages this software is installed best via Cabal
(http://www.haskell.org/cabal). In addition to GHC it depends on 0MQ 3.1.x
of course.

Notes

zeromq3-haskell mostly follows 0MQ's API. One difference though is that sockets
are parameterized types, i.e. there is not one single socket type but when
creating a socket the desired socket type has to be specified, e.g. Pair and
the resulting socket is of type Socket Pair.
This additional type information is used to ensure that only options applicable
to the socket type can be set.

Other differences are mostly for convenience. Also one does not deal directly
with 0MQ messages, instead these are created internally as needed.

Finally note that receive is already non-blocking internally.
GHC's I/O manager is used to wait for data to be available, so from a client's
perspective receive appears to be blocking.

Differences to the 0MQ 2.x binding

This library is based on the zeromq-haskell binding for 0MQ 2.x. Socket types
and options have been aligned with 0MQ 3.x and instead of using a big
SocketOption datatype, this library provides separate get and set functions for
each available option, e.g. affinity/setAffinity. For details, please refer
to the module's haddock documentation.

Examples

The examples folder contains some simple tests mostly mimicking the ones that come
with 0MQ.