From 138def0b992e250833020ebaca0ebb4d9a73dd71 Mon Sep 17 00:00:00 2001 From: Paul Colomiets Date: Fri, 27 Apr 2012 12:55:17 +0300 Subject: [PATCH] Added refinement for ZMQ_FD option --- doc/zmq_getsockopt.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/zmq_getsockopt.txt b/doc/zmq_getsockopt.txt index e418d124..47de64b2 100644 --- a/doc/zmq_getsockopt.txt +++ b/doc/zmq_getsockopt.txt @@ -355,6 +355,12 @@ necessarily indicate that messages are available to be read from, or can be written to, the underlying socket; applications must retrieve the actual event state with a subsequent retrieval of the 'ZMQ_EVENTS' option. +NOTE: The returned file descriptor is also used internally by 'zmq_send' and +'zmq_recv' functions. Given it's edge triggered nature, application must update +state of 'ZMQ_EVENTS' after each invocation of 'zmq_send' or 'zmq_recv'. +To be more explicit: after calling 'zmq_send' socket may become readable (and +vice versa) without triggering read event on file descriptor. + CAUTION: The returned file descriptor is intended for use with a 'poll' or similar system call only. Applications must never attempt to read or write data to it directly, neither should they try to close it.