This library provides Haskell bindings to zeromq (http://zeromq.org).
Version 0.6.0 - This software currently has beta status, i.e. it had seen limited testing. This version renames "with" to "withContext" and introduces a new "withSocket" resource wrapper. The API is otherwise identical to 0.5.0
This software requires zeromq version 2.1.x.
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 of course.
zeromq-haskell mostly follows 0MQ's API. One difference though is that sockets
are parameterized types, i.e. there is not one 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
This additional type information is used to ensure that only options applicable
to the socket type can be set, hence
only apply to
ZMQ_SUB sockets have their own functions (
unsubscribe) which can only be used with sockets of type
Other differences are mostly for convenience. Also one does not deal directly with 0MQ messages, instead these are created internally as needed.
The test folder contains some simple tests mostly mimicking the ones that come with 0MQ.