v8      !"#$%&'()*+,-./01234567 non-portable experimentaltoralf.wittner@gmail.comD89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{D89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{D89:;<=>?@ABCDEFGHIJIJKLMLMNOPOPQRSRSTUVWXYZ[\]YZ[\]^_`_`abcdefghijklmnopqrstuvwxyz{ non-portable experimentaltoralf.wittner@gmail.comL4Type representing a descriptor, poll is waiting for : (either a 0MQ socket or a file descriptor) plus the type  of event of wait for. 2The events to wait for in poll (cf. man zmq_poll) ZMQ_POLLIN | ZMQ_POLLOUT EZMQ_POLLOUT (outgoing messages, i.e. at least 1 byte can be written) ZMQ_POLLIN (incoming messages) 5Flags to apply on send operations (cf. man zmq_send) NoBlock: Send operation should be performed in non-blocking mode. F If it cannot be performed immediatley an error will be thrown (errno  is set to EAGAIN). NoFlush 36 should not flush the message downstream immediately, , instead it should batch messages send with  and really send them  only when 5! is invoked. zmq_send(3) states: "This is an optimisation M for cases where several messages are sent in a single business transaction. I 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."  ZMQ_NOFLUSH  ZMQ_NOBLOCK DThe option to set on 0MQ sockets (descriptions reproduced here from B zmq_setsockopt(3) (cf. man zmq_setsockopt for further details)). HighWM: High watermark for the message pipes associated with the @ socket. The water mark cannot be exceeded. If the messages  don'0t fit into the pipe emergency mechanisms of the 8 particular socket type are used (block, drop etc.) @ If HWM is set to zero, there are no limits for the content  of the pipe.  Default: 0 LowWM5 Low watermark makes sense only if high watermark is > defined (i.e. is non-zero). When the emergency state is B reached when messages overflow the pipe, the emergency lasts C at most till the size of the pipe decreases to low watermark. , Normal state is resumed at that point.  Default: 0 Swap9 Swap allows the pipe to exceed high watermark. However, F the data are written to the disk rather than held in the memory. I Until high watermark is exceeded there is no disk activity involved L though. The value of the option defines maximal size of the swap file.  Default: 0 Affinity8 Affinity defines which threads in the thread pool will H be used to handle newly created sockets. This way you can dedicate H some of the threads (CPUs) to a specific work. Value of 0 means no C affinity. Work is distributed fairly among the threads in the I thread pool. For non-zero values, the lowest bit corresponds to the H thread 1, second lowest bit to the thread 2 etc. Thus, value of 3 ? means that from now on newly created sockets will handle I/ O activity , exclusively using threads no. 1 and 2.  Default: 0 Identity4 Identity of the socket. Identity is important when I restarting applications. If the socket has no identity, each run of G the application is completely separated from other runs. However, E with identity application reconnects to existing infrastructure F left by the previous run. Thus it may receive messages that were L sent in the meantime, it shares pipe limits with the previous run etc.  Default: NULL Rate7 This option applies only to sending side of multicast  transports (pgm &5 udp). It specifies maximal outgoing data rate that + an individual sender socket can send.  Default: 100  RecoveryIVL2 This option applies only to multicast transports  (pgm &= udp). It specifies how long can the receiver socket survive H when the sender is inaccessible. Keep in mind that large recovery K intervals at high data rates result in very large recovery buffers, K meaning that you can easily overload your box by setting say 1 minute  recovery interval at 1Gb/(s rate (requires 7GB in-memory buffer).  Default: 10  McastLoop4 This option applies only to multicast transports  (pgm &: udp). Value of 1 means that the mutlicast packets can be E received on the box they were sent from. Setting the value to 0 K disables the loopback functionality which can have negative impact on F the performance. If possible, disable the loopback in production  environments.  Default: 1 SendBuf8 Sets the underlying kernel transmit buffer size to the F specified size. See SO_SNDBUF POSIX socket option. Value of zero - means leaving the OS default unchanged.  Default: 0  ReceiveBuf3 Sets the underlying kernel receive buffer size to E the specified size. See SO_RCVBUF POSIX socket option. Value of 2 zero means leaving the OS default unchanged.  Default: 0  ZMQ_RCVBUF  ZMQ_SNDBUF ZMQ_MCAST_LOOP ZMQ_RECOVERY_IVL  ZMQ_RATE  ZMQ_IDENTITY  ZMQ_AFFINITY  ZMQ_SWAP ZMQ_LWM ZMQ_HWM |@Socket to send messages down stream. Messages are load-balanced E among all the connected peers. Send function is not implemented for  this socket type. Compatible peer sockets: . <Socket to receive messages from up the stream. Messages are F fair-queued from among all the connected peers. Send function is not # implemented for this socket type. Compatible peer sockets: . )Special socket type to be used in request/reply middleboxes H such as zmq_queue(7). Requests received using this socket are already F properly tagged with prefix identifying the original requester. When E sending a reply via XREP socket the message should be tagged with a & prefix from a corresponding request.  Compatible peer sockets:  , . )Special socket type to be used in request/reply middleboxes B such as zmq_queue(7). Requests forwarded using this socket type I should be tagged by a proper prefix identifying the original requester. B Replies received by this socket are tagged with a proper postfix D that can be use to route the reply back to the original requester.  Compatible peer sockets: , . >Socket to receive requests and send replies. This socket type . allows only an alternated sequence of receive' s and send's. Each C send is routed to the peer that issued the last received request.  Compatible peer sockets:  , . :Socket to send requests and receive replies. Requests are D load-balanced among all the peers. This socket type allows only an  alternated sequence of send' s and recv's.  Compatible peer sockets: , . !?Socket to subscribe for data. Send function is not implemented > for this socket type. Initially, socket is subscribed for no  messages. Use /- to specify which messages to subscribe for.  Compatible peer sockets: $#. "#Socket to distribute data. 6 function is not ? implemented for this socket type. Messages are distributed in " fanout fashion to all the peers. Compatible peer sockets: "!. $%<Socket to communicate with a single peer. Allows for only a ' single connect or a single bind. There's no message routing  or message filtering involved. Compatible peer sockets: &%. &}~'(A 0MQ Socket. )A 0MQ context representation. *5Initialize a 0MQ context (cf. zmq_init for details). +&Terminate 0MQ context (cf. zmq_term). ,2Create a new 0MQ socket within the given context. -Close a 0MQ socket. .?Set the given option on the socket. Please note that there are B certain combatibility constraints w.r.t the socket type (cf. man  zmq_setsockopt). Please note that subscribe/%unsubscribe is handled with separate  functions. /(Subscribe Socket to given subscription. 0,Unsubscribe Socket from given subscription. 10Bind the socket to the given address (zmq_bind) 27Connect the socket to the given address (zmq_connect). 3Send the given  over the socket (zmq_send). 4Send the given  over the socket (zmq_send). & This is operationally identical to send socket (Strict.concat  (Lazy.toChunks lbs)) flags but may be more efficient. 5#Flush the given socket (useful for 3s with ). 6 Receive a  ByteString from socket (zmq_recv). 7Polls for events on the given  descriptors. Returns the  list of 8 descriptors for which an event occured (cf. zmq_poll). 8  !"#$%&'()*+,-./012345678')(   %&#$!" *+,-./012345678    !""#$$%&&'()*+,-./01234567       !!""#$%&'()*+,-./0123456789:;<=>?@ABCDDEFFGHHIJJKLMNOPPQRSTUUVWXYZ[\]^_`abcde+,fghijklmnopqrsttu$v%wxyzx{z|}~zeromq-haskell-0.2 System.ZMQSystem.ZMQ.BasePollFS PollEventInOutOutInFlagNoFlushNoBlock SocketOption ReceiveBufSendBuf McastLoop RecoveryIVLRateIdentityAffinitySwapLowWMHighWMDownUpXRepXrepXReqXreqRepReqSubPubP2PSizeSocketContextinittermsocketclose setOption subscribe unsubscribebindconnectsendsend'flushreceivepoll c_zmq_poll c_zmq_recv c_zmq_flush c_zmq_send c_zmq_connect c_zmq_bindc_zmq_setsockopt c_zmq_close c_zmq_socketc_zmq_msg_sizec_zmq_msg_datac_zmq_msg_closec_zmq_msg_init_sizec_zmq_msg_init c_zmq_term c_zmq_init ZMQPollEventpollValZMQFlagflagVal ZMQOptionoptVal ZMQSocketTypetypeVal ZMQPollPtr ZMQSocketZMQCtx ZMQMsgPtrZMQPollpSocketpFdpEventspReventsZMQMsgcontentusePollp2ppubsubrequestresponsexrequest xresponseupstream downstreamhighWMlowWMswapaffinityidentityrate recoveryIVL mcastLoopsendBuf receiveBufnoBlocknoFlushpollInpollOut pollInOutSubsTypeSType zmqSocketTypeTimeoutMessagemsgPtrsockctxbytestring-0.9.1.7Data.ByteString.Internal ByteStringData.ByteString.Lazy.Internal messageOf messageOfLazy messageClose messageInitmessageInitSize setIntOpt setStrOpt toZMQFlagcombine