Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | toralf.wittner@gmail.com |
- type Size = Word
- data Context
- data Socket a
- data Flag
- data SocketOption
- data Poll
- data PollEvent
- data P2P = P2P
- data Pub = Pub
- data Sub = Sub
- data Req = Req
- data Rep = Rep
- data XReq = Xreq
- data XRep = Xrep
- data Up = Up
- data Down = Down
- init :: Size -> Size -> Bool -> IO Context
- term :: Context -> IO ()
- socket :: SType a => Context -> a -> IO (Socket a)
- close :: Socket a -> IO ()
- setOption :: Socket a -> SocketOption -> IO ()
- subscribe :: SubsType a => Socket a -> String -> IO ()
- unsubscribe :: SubsType a => Socket a -> String -> IO ()
- bind :: Socket a -> String -> IO ()
- connect :: Socket a -> String -> IO ()
- send :: Socket a -> ByteString -> [Flag] -> IO ()
- flush :: Socket a -> IO ()
- receive :: Socket a -> [Flag] -> IO ByteString
- poll :: [Poll] -> Timeout -> IO [Poll]
Documentation
The events to wait for in poll (cf. man zmq_poll)
data SocketOption Source
Flags to apply on send operations (cf. man zmq_send)
Initialize a 0MQ context (cf. zmq_init).
Type representing a descriptor, poll is waiting for (either a 0MQ socket or a file descriptor) plus the type of event of wait for.
close :: Socket a -> IO ()Source
Set the given option on the socket. Please note that there are certain combatibility constraints w.r.t the socket type (cf. man zmq_setsockopt).
Please note that subscribe/unsubscribe is handled with separate functions.
subscribe :: SubsType a => Socket a -> String -> IO ()Source
Unsubscribe Socket from given subscription.
unsubscribe :: SubsType a => Socket a -> String -> IO ()Source
Bind the socket to the given address (zmq_bind)