diff options
author | Martin Lucina <mato@kotelna.sk> | 2010-03-09 18:47:31 +0100 |
---|---|---|
committer | Martin Lucina <mato@kotelna.sk> | 2010-03-09 18:47:31 +0100 |
commit | 1aee86408d575d6572b071d7564da7f006d1757e (patch) | |
tree | 98d54989b5961db8c458017034bfb8f981e98c8f /doc/zmq_flush.txt | |
parent | d790940fd06060c8a2c624b0e41e470ad31ae0d8 (diff) |
Documentation rewrite
Diffstat (limited to 'doc/zmq_flush.txt')
-rw-r--r-- | doc/zmq_flush.txt | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/doc/zmq_flush.txt b/doc/zmq_flush.txt index 3a2cd37..77f4452 100644 --- a/doc/zmq_flush.txt +++ b/doc/zmq_flush.txt @@ -4,56 +4,52 @@ zmq_flush(3) NAME ---- -zmq_flush - flushes pre-sent messages to the socket +zmq_flush - flush messages queued on a socket SYNOPSIS -------- -'int zmq_flush (void *s);' +*int zmq_flush (void '*socket');* DESCRIPTION ----------- -Flushes all the pre-sent messages - i.e. those that have been sent with -ZMQ_NOFLUSH flag - to the socket. This functionality improves performance in -cases where several messages are sent during a single business operation. -It should not be used as a transaction - ACID properties are not guaranteed. -Note that calling 'zmq_send' without ZMQ_NOFLUSH flag automatically flushes all -previously pre-sent messages. +The _zmq_flush()_ function shall flush messages previously queued on the socket +referenced by the 'socket' argument. The _zmq_flush()_ function only affects +messages that have been queued on the _message queue_ associated with 'socket' +using the 'ZMQ_NOFLUSH' flag to the _zmq_send()_ function. If no such messages +exist, the function has no effect. + +CAUTION: A successful invocation of _zmq_flush()_ does not indicate that the +flushed messages have been transmitted to the network, or even that such a +transmission has been initiated by 0MQ. This function exists merely as a way +for the application programmer to supply a hint to the 0MQ infrastructure that +the queued messages *may* be flushed as a single batch. RETURN VALUE ------------ -In case of success the function returns zero. Otherwise it returns -1 and -sets 'errno' to the appropriate value. +The _zmq_flush()_ function shall return zero if successful. Otherwise it shall +return -1 and set 'errno' to one of the values defined below. ERRORS ------ *ENOTSUP*:: -function isn't supported by particular socket type. +The _zmq_flush()_ operation is not supported by this socket type. *EFSM*:: -function cannot be called at the moment, because socket is not in the -approprite state. - - -EXAMPLE -------- ----- -rc = zmq_send (s, &msg1, ZMQ_NOFLUSH); -assert (rc == 0); -rc = zmq_send (s, &msg2, ZMQ_NOFLUSH); -assert (rc == 0); -rc = zmq_flush (s); -assert (rc == 0); ----- +The _zmq_flush()_ operation cannot be performed on this socket at the moment +due to the socket not being in the appropriate state. SEE ALSO -------- linkzmq:zmq_send[3] +linkzmq:zmq_socket[3] +linkzmq:zmq[7] AUTHOR ------ -Martin Sustrik <sustrik at 250bpm dot com> +The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and +Martin Lucina <mato@kotelna.sk>. |