packages feed

zeromq-haskell 0.2.1 → 0.2.2

raw patch · 4 files changed

+4/−25 lines, 4 files

Files

README view
@@ -3,7 +3,7 @@  · Current status -Version 0.2 - This software currently has *alpha* status, i.e. it had+Version 0.2.x - This software currently has *alpha* status, i.e. it had only seen very limited testing and changes to its API might happen.  This software was developed and tested on Linux 2.6.31 with GHC-6.12.1@@ -31,7 +31,6 @@ - connect - send - send'-- flush - receive - poll 
src/System/ZMQ.hs view
@@ -44,7 +44,6 @@     connect,     send,     send',-    flush,     receive,      poll@@ -253,17 +252,7 @@ -- [@NoBlock@] Send operation should be performed in non-blocking mode. -- If it cannot be performed immediatley an error will be thrown (errno -- is set to EAGAIN).------ [@NoFlush@] 'send' should not flush the message downstream immediately,--- instead it should batch messages send with 'NoFlush' and really send them--- only when 'flush' is invoked. zmq_send(3) states: \"This is an optimisation--- for cases where several messages are sent in a single business transaction.--- However, the effect is measurable only in extremely high-perf scenarios--- (million messages a second or so). If that's not your case, use standard--- flushing send instead.\"-data Flag =-    NoBlock -- ^ ZMQ_NOBLOCK-  | NoFlush -- ^ ZMQ_NOFLUSH+data Flag = NoBlock -- ^ ZMQ_NOBLOCK   deriving (Eq, Ord, Show)  -- | The events to wait for in poll (cf. man zmq_poll)@@ -351,10 +340,6 @@ send' (Socket s) val fls = bracket (messageOfLazy val) messageClose $ \m ->     throwErrnoIfMinus1_ "send'" $ c_zmq_send s (msgPtr m) (combine fls) --- | Flush the given socket (useful for 'send's with 'NoFlush').-flush :: Socket a -> IO ()-flush = throwErrnoIfMinus1_ "flush" . c_zmq_flush . sock- -- | Receive a 'ByteString' from socket (zmq_recv). receive :: Socket a -> [Flag] -> IO (SB.ByteString) receive (Socket s) fls = bracket messageInit messageClose $ \m -> do@@ -460,7 +445,6 @@  toZMQFlag :: Flag -> ZMQFlag toZMQFlag NoBlock = noBlock-toZMQFlag NoFlush = noFlush  combine :: [Flag] -> CInt combine = fromIntegral . foldr ((.|.) . flagVal . toZMQFlag) 0
src/System/ZMQ/Base.hsc view
@@ -91,8 +91,7 @@ newtype ZMQFlag = ZMQFlag { flagVal :: CInt } deriving (Eq, Ord)  #{enum ZMQFlag, ZMQFlag,-    noBlock = ZMQ_NOBLOCK,-    noFlush = ZMQ_NOFLUSH+    noBlock = ZMQ_NOBLOCK }  newtype ZMQPollEvent = ZMQPollEvent { pollVal :: CShort } deriving (Eq, Ord)@@ -151,9 +150,6 @@  foreign import ccall unsafe "zmq.h zmq_send"     c_zmq_send :: ZMQSocket -> ZMQMsgPtr -> CInt -> IO CInt--foreign import ccall unsafe "zmq.h zmq_flush"-    c_zmq_flush :: ZMQSocket -> IO CInt  foreign import ccall safe "zmq.h zmq_recv"     c_zmq_recv :: ZMQSocket -> ZMQMsgPtr -> CInt -> IO CInt
zeromq-haskell.cabal view
@@ -1,5 +1,5 @@ name:               zeromq-haskell-version:            0.2.1+version:            0.2.2 synopsis:           bindings to zeromq  description:        Bindings to zeromq (http://zeromq.org) category:           System, FFI