Commit Graph

461 Commits

Author SHA1 Message Date
Pieter Hintjens
e7da0ea07b Problem: client/server pattern is not documented
Solution: add man pages/sections for:

 * ZMQ_SERVER
 * ZMQ_CLIENT
 * ZMQ_THREADSAFE
 * zmq_msg_routing_id
 * zmq_msg_set_routing_id
2015-09-11 17:12:58 -04:00
Floris Bruynooghe
f86264db3e Update zmq_inproc manpage for bind/connect order
The order of zmq_bind() and zmq_connect() is no longer important
for the inproc transport since libzmq 4.0.  This updates this
in the zmq_inproc manpage.
2015-08-27 10:40:21 +01:00
Pieter Hintjens
2b45e38b7b Problem: documentation for ZMQ_CTX_BLOCKY is wrong
Solution: fix it. Default is true, not false.
2015-08-11 19:34:25 +02:00
KIU Shueng Chuan
ca9215de1e add ZMQ_TCP_RETRANSMIT_TIMEOUT socket option 2015-08-06 23:36:27 +08:00
KIU Shueng Chuan
c9971e08a0 write man pages 2015-08-04 22:17:02 +08:00
KIU Shueng Chuan
2d9c7f3a1f ZMQ_TCP_KEEPALIVE_IDLE doc wrongly mentions TCP_KEEPCNT
was fixed in zmq_setsockopt.txt but not in zmq_getsockopt.txt
2015-08-04 21:43:44 +08:00
Joe Eli McIlvain
6d0cea54aa Fix alphabetical order of non-deprecated setsockopt docs. 2015-07-31 22:37:36 -07:00
Joe Eli McIlvain
94c579a6c0 Fix title of docs for ZMQ_XPUB_WELCOME_MSG socket option. 2015-07-31 22:36:57 -07:00
KIU Shueng Chuan
d9f32611ad ZMQ_TCP_KEEPALIVE_IDLE doc wrongly says it overrides TCP_KEEPCNT 2015-08-01 06:29:06 +08:00
KIU Shueng Chuan
3e7d737360 change ZMQ_STREAM_NOTIFY to default to 1 2015-07-24 05:21:53 +08:00
KIU Shueng Chuan
518b939f31 make ZMQ_STREAM_NOTIFY also control disconnect notificatons 2015-07-24 05:21:53 +08:00
Ricardo Catalinas Jiménez
ec5592db1f Fix 1478: receive unsubscriptions in XPUB when verbose
Fixes not receiving unsubscription messages in XPUB socket with
ZMQ_XPUB_VERBOSE and using a XSUB-XPUB proxy in front.

This adds two modifications:

- It adds a new flag, ZMQ_XPUB_VERBOSE_UNSUBSCRIBE, to enable verbose
  unsubscription messages, necessary when using a XSUB/XPUB proxy.

- It adds a boolean switch to zmq::mtrie_t::rm () to control if the
  callback is invoked every time or only in the last removal. Necessary
  when a pipe is terminated and the verbose mode for unsubscriptions is
  enabled.
2015-07-23 12:02:34 +01:00
Ricardo Catalinas Jiménez
7030bc429a Fix doc formatting issues in zmq_setsockopt page 2015-07-19 12:20:45 +01:00
leonarf
4a5998382c THREAD PRIORITY option documentation
Added documentation about context's options ZMQ_THREAD_SCHED_POLICY and ZMQ_THREAD_PRIORITY
2015-07-16 08:59:19 +02:00
Juha Reunanen
7362f3af0f update documentation regarding the rcvbuf parameter 2015-07-08 11:59:47 +03:00
Juha Reunanen
8096990e45 update documentation regarding the sndbuf and rcvbuf parameters 2015-07-08 11:41:42 +03:00
Jonathan Reams
e9a5bc8d1e Fix units and default values for heartbeats options
Set the ZMQ_HEARTBEAT_TIMEOUT to default to the value of
ZMQ_HEARTBEAT_IVL if it's not explicitly set.
Change the units of ZMQ_HEARTBEAT_TTL to milliseconds in the API
and round down to the nearest decisecond so that all the options
are using the same units.
Make the maximum heartbeat TTL match the spec (6553 seconds)
2015-06-26 14:25:58 -04:00
Jonathan Reams
85417ba2fc Add documentation for ZMTP heartbeat socket options 2015-06-24 15:02:53 -04:00
Jason Unovitch
45610c354d Enable install of man pages when BUILD_DOC is not set by shifting INSTALL_MAN outside of BUILD_DOC's if/endif 2015-06-05 21:43:39 -04:00
Kapp Arnaud
4ad9a5e570 Update documentation for zmq_setsockopt.
Pull request #1426 now allow for changing the watermark
after and connect() or a bind(). This patch reflect the
change in the documentation.

Also closes #1416.
2015-06-05 22:14:40 +02:00
Diego Fons
fcf7b22b92 doc/zmq_socket.txt: Remove note about ZMQ_PAIR being experimental. 2015-05-22 15:46:28 -03:00
Jörg Kreuzberger
d4a5803495 Update zmq_setsockopt.txt
#1287
2015-04-14 18:32:06 +02:00
Jörg Kreuzberger
18b6e6803b Add documenation for ZMQ_XPUP_NODROP
fix for issue #1287
2015-04-14 18:30:27 +02:00
Dylan Cali
edc0640206 doc: add ENOENT to list of zmq_unbind error codes
Resolves zeromq/libzmq#1353
2015-03-15 08:07:13 -05:00
Dylan Cali
023505aced update zmq_ctx_term description for consistency
zmq_term and zmq_ctx_destroy are just aliases for zmq_ctx_term. that
being the case use 'terminate' in the description for all three so there
isn't any confusion about behavior.

also update the deprecates list in zmq_ctx_term to include
zmq_ctx_destroy.
2015-03-15 06:29:21 -05:00
Dylan Cali
4c92fefe1b doc: zmq_msg_init does not set errno
In fact it always returns zero.
2015-03-15 02:12:02 -05:00
Julien Ruffin
cf2238f80e Added socket option ZMQ_INVERT_MATCHING.
ZMQ_INVERT_MATCHING reverses the PUB/SUB prefix matching. The subscription
list becomes a rejection list. The PUB socket sends messages to all
connected (X)SUB sockets that do not have any matching subscription.

Whenever the option is used on a PUB/XPUB socket, any connecting SUB
sockets must also set it or they will reject everything the publisher
sends them. XSUB sockets are unaffected because they do not filter out
incoming messages.
2015-01-26 17:59:43 +01:00
Constantin Rack
4ad2edff38 Merge pull request #1322 from hintjens/master
Problem: commit afb24b53 broke ZMQ_STREAM contract
2015-01-23 18:03:10 +01:00
Pieter Hintjens
6ced7027a0 Problem: commit afb24b53 broke ZMQ_STREAM contract
Symptom is that ZMQ_STREAM sockets in 4.1.0 and 4.1.1 generate zero
sized messages on each new connection, unlike 4.0.x which did not do
this.

Person who made this commit also changed test cases so that contract
breakage did not show. Same person was later banned for persistently
poor form in CZMQ contributions.

Solution: enable connect notifications on ZMQ_STREAM sockets using a
new ZMQ_STREAM_NOTIFY setting. By default, socket does not deliver
notifications, and behaves as in 4.0.x.

Fixes #1316
2015-01-23 15:25:40 +01:00
Thomas Rodgers
40d2f9ad5d fix typo in zmq_msg_gets documentation 2015-01-17 20:15:31 -06:00
Thomas Rodgers
4e89ae616a Fix typo in zmq_msg_gets documentation 2015-01-16 15:45:09 -06:00
Thomas Rodgers
cf2bd3b6ae Expand on 'Peer-Address' property documentation 2015-01-16 15:37:22 -06:00
Thomas Rodgers
7d224d7871 Add 'Peer-Address' property to connection metadata
Allows non-C/C++ based clients easy access to the peer's IP address via
zmq_msg_gets(&msg, "Peer-Address") instead of zmq_msg_get(&msg, ZMQ_SRCFD)
followed by calls to getpeername and getnameinfo
2015-01-16 14:52:16 -06:00
Thomas Rodgers
39285cb969 Try to clarify the intent of zmq_msg_gets() in documentation 2015-01-16 10:50:04 -06:00
Thomas Rodgers
a55005feb1 Remove documentation for ZMQ_IDENTITY_FD 2015-01-09 17:32:05 -06:00
Pieter Hintjens
04664f0ef7 Problem: 'bool' is not defined by default
zmq_atomic_counter_dec returned a 'bool' value, yet this isn't
defined by standard, so causes compile errors in upstream code.

Solution: return an int that can be safely converted to bool if
needed by bindings.
2014-12-23 15:20:10 +01:00
Pieter Hintjens
2de940b422 Problem: need atomic reference counting in several projects
Solution: as libzmq already provides this across all platforms,
expose an atomic counter API. I've not wrapped atomic pointers,
though someone who needs this may want to do so.
2014-12-23 01:14:38 +01:00
Pieter Hintjens
f5f4d27354 Problem: zmq_epgm is duplicate of zmq_pgm
There is zero benefit to this, and some confusion due to the special
case nature of this man page.

Solution: delete the zmq_epgm man page.
2014-12-07 17:04:52 +01:00
Doron Somech
cdf4a1211d documentation for welcome msg and xpub manual 2014-11-26 22:47:42 +02:00
Pieter Hintjens
b6e61d72b2 Problem: linger values other than -1 or 0 are unsafe
Solution: set defaults back to infinity, and add new context
option, ZMQ_BLOCKY that the user can set to false to get a
less surprising behavior on context termination. Eg.

    zmq_ctx_set (ctx, ZMQ_BLOCKY, false);
2014-11-17 11:56:59 +01:00
Min RK
35dd85a1db use more conservative 30 second default timeout for LINGER
Regression in #1248 can cause lost messages at exit.
2014-11-09 10:05:04 -08:00
J.T. Conklin
bc718b5307 Merge remote-tracking branch 'upstream/master' 2014-11-07 22:36:37 -08:00
J.T. Conklin
ea011a33de Fix typos. 2014-11-07 22:30:15 -08:00
J.T. Conklin
afec8440ae Use consistant spelling in documentation
behavior -> behaviour
initialize -> initialse
initialization -> initialisation
2014-11-07 22:27:41 -08:00
Constantin Rack
7b6e310b47 Merge pull request #1248 from hintjens/master
Problem: default LINGER value is insane
2014-11-07 23:52:00 +01:00
Pieter Hintjens
7781375adf Problem: default LINGER value is insane
Solution: use a sane value, e.g. 2 seconds

Fixes #1247
2014-11-06 15:32:31 +01:00
Martin Hurton
6d9f97ad60 Merge pull request #1246 from hintjens/master
Documentation fix for zmq_ctx_term
2014-11-06 11:51:38 +01:00
Pieter Hintjens
ea9f7acce3 Problem: zmq_ctx_term has insane behavior by default
Solution: document this with a clear warning. It would be
nicer perhaps to change the default LINGER to e.g. a few
seconds. However this could break existing applications.
2014-11-06 10:55:26 +01:00
J.T. Conklin
7176b854bc Fix typo: endpoind -> endpoint 2014-11-05 06:24:22 -08:00
J.T. Conklin
b6ae984b11 Fix typo: addres -> address 2014-11-05 06:18:25 -08:00
lysyloren
f47960e4bc Added test and updated documentation for unbind wild-card * binded socket 2014-10-29 09:43:47 +01:00
lysyloren
09e7416ee9 Unbind socket with real endpoint when binding by wild-card * address 2014-10-27 14:16:36 +01:00
Pieter Hintjens
0e7458daf3 Merge pull request #1216 from xaqq/pollpri
Add support for POLLPRI flag.
2014-10-18 00:33:20 +02:00
Kapp Arnaud
779c37abc4 Add support for POLLPRI flag.
This commit adds a ZMQ_POLLPRI flag that maps to poll()'s POLLPRI
flag.
This flags does nothing for OMQ sockets. It's only useful for raw
file descriptor (be it socket or file).
This flag does nothing if poll() is not the underlying polling
function. So it is Linux only.
2014-10-17 17:21:41 +02:00
Pieter Hintjens
b6762a6a8b Marked TCP and IPC filters as deprecated (ZAP) 2014-10-14 16:30:20 +02:00
Phillip Mienk
00b3bfab10 Remove local pgm configuration option, cleanup configure.ac, remove unused Makefile.am instances. 2014-10-13 19:10:36 -07:00
Pieter Hintjens
51c8c1d67a Problem: undocumented limit on IPC paths in Linux is 107 chars
Solution: document the limit of 113 chars including ipc://. We might
fix this in libzmq by shortening an over-long IPC pathname into a
unique string; so long as this is done consistently in bind and in
connect, it will save applications from weird failures when they
use external data to generate IPC pathnames.
2014-09-10 09:38:04 +02:00
Kapp Arnaud
fbdc5aa22d Add const qualifier to source parameters in zmq_z85_decode and zmq_z85_encode 2014-08-14 00:00:00 +02:00
Pieter Hintjens
75d4f50be3 Problem: ZMQ_CURVE_SECRETKEY reads beyond end of Z85 data
Solution: change setsockopts on printable keys to expect 41, nor 40
bytes. Code still accepts 40 bytes for compatibility, and copies the
key to a well-terminated string before using it.

Fixes #1148
2014-08-12 12:37:49 +02:00
Pieter Hintjens
2c5baff95f Note that ZMQ_TCP_ACCEPT_FILTER is deprecated 2014-08-12 12:37:49 +02:00
Pieter Hintjens
446e8efb07 Merge pull request #1155 from mrvn/pull-document_hwm_behaviour_with_ZMQ_ROUTER_MANDATORY
Document altered HWM behaviour when ZMQ_ROUTER_MANDATORY is set.
2014-08-07 13:29:14 +02:00
Goswin von Brederlow
da6cf63857 Document altered HWM behaviour when ZMQ_ROUTER_MANDATORY is set. 2014-08-07 13:16:12 +02:00
Thomas Rodgers
03f097a541 Update zmq_msg_get(ZMQ_SHARED) to return true for type_cmsg messages 2014-07-29 13:43:38 -05:00
MinRK
4406329100 define encoding for message metadata to be UTF8
clarifies that these are text fields,
and removes ambiguity about how to create proper
text object from stored bytes.
2014-07-28 13:23:56 -07:00
Trevor Bernard
ac99d50abb Merge pull request #1142 from hintjens/master
Problem: does not install man pages correctly when out of tree
2014-07-25 16:49:34 -03:00
Pieter Hintjens
cdbe557727 Problem: does not install man pages correctly when out of tree
Solution: fix Makefile.am

As per Richard Sharpe on zeromq-dev.
2014-07-25 21:39:51 +02:00
Thomas Rodgers
82282d6973 Added test and doc section for ZMQ_SHARED message flag 2014-07-12 18:05:49 -05:00
Richard Newton
407843374d Merge pull request #1105 from hintjens/master
Fixed typo in doc example
2014-06-24 10:38:46 +01:00
Pieter Hintjens
18d222515f Fixed typo in doc example 2014-06-23 20:24:36 +02:00
Richard Newton
82be399527 Merge pull request #1097 from hintjens/master
Added capabilities API
2014-06-23 13:23:20 +01:00
Mike Gatny
0a4123fd91 Add documentation for GSSAPI options. 2014-06-19 23:57:48 -04:00
Pieter Hintjens
f11d673ba9 Problem: need way to probe library capabilities
As libzmq is compiled with optional transports and security mechanisms,
there is no clean way for applications to determine what capabilities
are actually available in a given libzmq instance.

Solution: provide an API specifically for capability reporting. The
zmq_has () method is meant to be open ended. It accepts a string so
that we can add arbitrary capabilities without breaking existing
applications.

zmq.h also defines ZMQ_HAS_CAPABILITIES when this method is provided.
2014-06-18 15:19:07 +02:00
Pieter Hintjens
4b67919f93 Minor trim of man page title 2014-05-20 15:42:35 +02:00
Pieter Hintjens
a178097f95 Problem: artificial restriction on binary identities
Applications that use ZMQ_IDENTITY can be trapped by the artificial
restriction on not using a binary zero as first byte. It's specially
nasty on random generated identities, e.g. UUIDs, as the chance of a
binary zero is low, so it will pass 255 out of 256 times.

Solution: remove the restriction.
2014-05-16 16:00:37 +02:00
Stoian Ivanov
a16d3dbb0e docu 2014-05-12 11:02:44 +03:00
Will Strang
afe5fd87e9 Issue #1017: add ZMQ_HANDSHAKE_IVL time limit on connection handshake 2014-05-09 13:54:24 +00:00
Pieter Hintjens
c01365d486 Fixed man page example 2014-05-02 23:13:11 +02:00
Pieter Hintjens
84ed81c014 Added test_metadata
- also prioritize ZAP metadata over ZMTP metadata in case application
  uses same names.
2014-05-02 22:21:50 +02:00
Pieter Hintjens
408dea796f Merge pull request #993 from klnikita/src_addr_connect
Allow to set up a source address and port for outgoing tcp connections in zmq_connect
2014-04-30 14:57:08 +02:00
nikita kozlov
acb6807041 Allow to set up a source address and port for outgoing tcp connections in zmq_connect()
Few examples:
tcp:://192.168.0.4:55555;192.168.0.254:1234
tcp:://192.168.0.4:0;192.168.0.254:1234
tcp:://eth2:55555;192.168.0.254:1234
2014-04-30 14:43:37 +02:00
Martin Hurton
f81a1304ff Update function prototype for zmq_msg_gets ()
Added modifiers reflect the following properties:
- zmq_msg_gets () does not mutate property parameter
- zmq_msg_gets () returns a pointer to memory the caller should not
  modify
2014-04-30 13:27:06 +02:00
Pieter Hintjens
c6f8093bfb Added zmq_ctx_shutdown to Makefile
- also removed deprecated man pages from Makefile
- they remain in repository for reference
2014-04-29 12:06:57 +02:00
Pieter Hintjens
9753de8566 Problem: zmq_socket_monitor code is dirty
Specifically:

* zmq_event_t should not be used internally in libzmq, it was
  meant to be an outward facing structure.

* In 4.x, zmq_event_t does not correspond to monitor events, so
  I removed the structure entirely.

* man page for zmq_socket_monitor is incomplete and the example
  code was particularly nasty.

* test_monitor.cpp needed rewriting, it was not clean.
2014-04-28 11:30:49 +02:00
Pieter Hintjens
97935c582e Added link to zmq_msg_gets 2014-04-28 11:30:49 +02:00
KIU Shueng Chuan
d4c5dc9b1d update ZMQ_STREAM docs about connection notification
Also the portion about how to close a connection does not only apply to
servers.
2014-04-27 06:16:59 +08:00
Dahko
6a627acea7 Fixed wrong assert in zmq_recv
zmq_recv returns bytes count, not error code, so 'assert (rc==0)' behaved completely wrong
2014-03-17 16:38:19 +03:00
KennethWilke
2bcf860e77 Minor change to zmq_curve_keypair doc 2014-03-06 15:18:42 -06:00
Pieter Hintjens
305a1442ae Added scaffolding for zmq_msg_gets 2014-03-03 13:19:40 +01:00
Olaf Mandel
45dfbc5248 Fix zmq_socket example in documentation
Issues adressed:
 - The actual data was never read from the socket, causing all even
   numbered loop iterations to fail
 - The socket variable was called server once
2014-02-24 18:27:03 +01:00
Olaf Mandel
e41c8cba0e Rename ZMQ_MAX_SOCKETS_MAX to ZMQ_SOCKET_LIMIT
As per suggestion by Pieter Hintjens. Also update wording in
zmq_ctx_set manual a bit.
2014-02-14 10:09:19 +01:00
Pieter Hintjens
1e9ea54bf6 Merge pull request #889 from olafmandel/MAX_SOCKETS_MAX
Add ZMQ_MAX_SOCKETS_MAX to zmq_ctx_get()
2014-02-13 19:15:01 +01:00
Laurent Alebarde
3fb800c100 fix revert 2014-02-13 18:52:15 +01:00
Laurent Alebarde
abf9d8b74e Revert "add a proxy hook"
This reverts commit 9ae6a91fad.
2014-02-13 18:35:09 +01:00
Laurent Alebarde
bc25366f7c Revert "add proxy_chain, a multi proxies chaining in the same thread feature"
This reverts commit bc7441f517.
2014-02-13 18:35:09 +01:00
Olaf Mandel
5815b768b9 Add ZMQ_MAX_SOCKETS_MAX to zmq_ctx_get()
The new options allows querying the maximum allowed number of sockets.
This is system dependent and cannot be encoded in the include file as a
preprocessor macro: for ZMQ_USE_SELECT, this depends on the FD_SETSIZE
macro at time of library compilation, not at time of include file use.
2014-02-13 15:54:06 +01:00
Pieter Hintjens
fa318400dc Fixed man page for zmq_proxy_hook
- spaces instead of tabs for indentation
- fixed levels under EXAMPLE USAGE
- added to Makefile.am
2014-01-29 15:15:29 +01:00
Laurent Alebarde
bc7441f517 add proxy_chain, a multi proxies chaining in the same thread feature 2014-01-28 18:15:01 +01:00
Pieter Hintjens
b1aba5dc30 Fixed example for zmq_msg_copy 2014-01-24 12:07:46 -06:00
Pieter Hintjens
62ac5bb77f Fixed type for ZMQ_RCVMORE getsockopt example 2014-01-24 12:07:46 -06:00
Laurent Alebarde
9ae6a91fad add a proxy hook 2014-01-24 16:52:30 +01:00