Commit Graph

627 Commits

Author SHA1 Message Date
Luca Boccassi
4bcbb3055e Problem: cannot use pre-allocated FDs. Fixes #777
Solution: add new [set|get]sockopt ZMQ_PRE_ALLOCATED_FD to allow
users to let ZMQ use a pre-allocated file descriptor instead of
allocating a new one. Update [set|get]sockopt documentation and
test accordingly.

The main use case for this feature is a socket-activated systemd
service. For more information about this feature see:
http://0pointer.de/blog/projects/socket-activation.html
2016-02-04 16:57:26 +00:00
Pieter Hintjens
44c6b0484e Revert "Revert "Problem: deprecated use and reference of zmq_term"" 2016-02-01 23:00:06 +01:00
Pieter Hintjens
1708bfefb7 Revert "Problem: deprecated use and reference of zmq_term" 2016-02-01 22:41:51 +01:00
Constantin Rack
a26bb743d4 Problem: docs are still referring to deprecated zmq_term
Solution: Replace with `zmq_ctx_term`
2016-02-01 22:00:35 +01:00
Pieter Hintjens
2566c02a9e Problem: CLIENT and SERVER don't check SNDMORE
These sockets don't handle multipart data, so if callers send it,
they drop frames, and things break silently.

Solution: if the caller tries to use ZMQ_SNDMORE, return -1 and
set errno to EINVAL.
2015-12-29 17:00:06 +01:00
Ilya Kulakov
3caa637e1b Add special interface to represent local VMCI context. 2015-12-14 19:20:27 +06:00
Pieter Hintjens
4dcfb23e2e Problem: zmq_vmci man page claims to be zmq_ipc man page
Solution: fix this.
2015-12-09 10:45:12 +01:00
Ilya Kulakov
68b13fbddb Add the VMCI transport.
VMCI transport allows fast communication between the Host
and a virtual machine, between virtual machines on the same host,
and within a virtual machine (like IPC).

It requires VMware to be installed on the host and Guest Additions
to be installed on a guest.
2015-12-08 13:16:09 +06:00
Jim Hague
e71471b2e8 Add new option ZMQ_MULTICAST_MAXTPDU to set PGM_MTU.
Fixes #1646
2015-11-23 19:35:02 +00:00
Constantin Rack
fc1099ffd1 Problem: documentation shows wrong default value
Solution: fix documentation
2015-11-13 11:08:23 +01:00
Constantin Rack
ec41f6540f Problem: tcp_recv/send_buffer should be byte value instead of scale factor
Solution: change option behaviour and adopt documentation
2015-11-13 10:47:15 +01:00
Jens Auer
cdeec4c115 New options to set send/recv buffer size for TCP sockets. 2015-11-08 19:00:29 +01:00
maurice barnum
b12b8ca23b Fix typo on send documentation re: nullification 2015-09-18 11:22:12 -07:00
Elliot Saba
1fbc67a40a Fix pointer indirection precedence issue in docs
Without this change, a segmentation fault is likely to occur when using the proposed snippet of code, as `*address[size]` is equivalent to `*(address[size])`, not `(*address)[size]` as clearly intended.
2015-09-13 20:46:14 -07:00
Pieter Hintjens
3f9255019b Problem: description of ZMQ_CLIENT/SERVER has inaccuracies
- both are thread safe
- they do not accept ZMQ_SNDMORE nor ZMQ_RCVMORE
2015-09-13 12:28:43 +02:00
Pieter Hintjens
f3ee8c69db Problem: request-reply pattern is lousy
REQ-REP barely work, and DEALER-ROUTER are misnamed. As we move to
formalizing CLIENT-SERVER, we can deprecate request-reply.

Solution: move this section to the end of the man page, and mark as
"will be deprecated".
2015-09-11 17:22:37 -04:00
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
KIU Shueng Chuan
e71dfd13d7 typo fix: RECVHWM -> RCVHWM 2014-01-22 08:40:35 +08:00
Tim M
515af9b147 Added assert on duplicate id in ROUTER and STREAM sockets. Updated man to reflect this change. Modified test case to match. 2014-01-21 11:43:34 -08:00
Tim M
3fbc10eba7 Updated man entries, and added behavior in case the user duplicates peer ids. In this case the socket reverts to default behavior. 2014-01-19 17:28:13 -08:00
Andre Caron
17651b9276 Adds support for detecting ZMQ_STREAM disconnections.
When a ZMQ_STREAM socket connection is broken (intentionally, via `shutdown()`
or accidentally via client crash or network failure), there is no way for the
application to dertermine that it should drop per-connection data (such as
buffers).

This contribution makes sure the application receives a 0-length message to
notify it that the connection has been broken.  This is symmetric with the
process of closing the connection from within the application (where the
application sends a 0-length message to tell ZeroMQ to close the connection).

Conflicts:
	CMakeLists.txt
2014-01-14 17:20:46 -08:00
Stefan Radomski
23ea1b2b64 typo in docs 2014-01-07 01:13:46 +01:00
Stefan Radomski
3aeaa6fab1 ZMQ_SRCFD docs and tests
Also moved the fd field from message content to message itself
2014-01-07 01:09:51 +01:00
Pieter Hintjens
5bf96f64b0 Removed ZMQ_ZAP_IPC_CREDS option
- This seems redundant; is there a use case for NOT providing
  the IPC credentials to the ZAP authenticator?

- More, why is IPC authentication done via libzmq instead of ZAP?
  Is it because we're missing the transport type on the ZAP request?
2014-01-01 17:39:14 +01:00
Pieter Hintjens
adf5b45d71 Reordered socket options
- put into alphabetical order
- there was no consistency in previous ordering
2014-01-01 16:28:30 +01:00
Pieter Hintjens
49a2902c82 Fixed issue #801 2014-01-01 15:36:47 +01:00
Pieter Hintjens
9d9592f830 Whitespace fixes
Minor layout fix

Whitespace fix
2014-01-01 15:36:33 +01:00
KIU Shueng Chuan
5fa3f0a045 doc bugfix: ZMQ_MSGMORE should be ZMQ_SNDMORE 2013-12-23 23:06:18 +08:00
Alexey Melnichuk
b7a2248e22 Update doc for zmq_proxy_steerable [ci skip] 2013-12-17 15:27:55 +03:00
Brandon Carpenter
a018ef5e86 Add support for extending ZAP request address with IPC peer credentials.
Another take on LIBZMQ-568 to allow filtering IPC connections, this time
using ZAP.  This change is backward compatible.  If the
ZMQ_ZAP_IPC_CREDS option is set, the user, group, and process IDs of the
peer process are appended to the address (separated by colons) of a ZAP
request; otherwise, nothing changes.  See LIBZMQ-568 and zmq_setsockopt
documentation for more information.
2013-12-06 14:28:44 -08:00
Brandon Carpenter
dc9b1309b9 Shortened ZMQ_IPC_ACCEPT_FILTER_[UGP]ID to ZMQ_IPC_FILTER_[UGP]ID. 2013-12-06 09:58:10 -08:00
Pieter Hintjens
e48ca50663 Merge pull request #774 from shubred1/master
Updated documentation for zmq_disconnect() and zmq_setsockopt().
2013-12-05 03:23:12 -08:00
Brandon Carpenter
2252322acc Add IPC accept filter socket options.
Adds ZMQ_IPC_ACCEPT_FILTER_{PID,UID,GID} socket options to add processs,
user, and group IDs to the IPC filter sets. Fixes LIBZMQ-568.
2013-12-04 14:23:13 -08:00
Shane Hubred
c7693bedea Updated documentation for zmq_disconnect() and zmq_setsockopt(). 2013-12-04 15:02:49 -06:00
Chris Laws
38bceca9ca Add ability to set and get DSCP socket option 2013-11-25 13:31:21 +10:30
Mathias Hablützel
3535a1d7ea
Fixed typo in documentation about zmq_proxy_steerable() 2013-11-15 15:31:09 +01:00
Pieter Hintjens
c89518d33d Added links to RFCs for socket patterns 2013-11-13 13:57:57 +01:00
Mark Barbisan
e84f17bbb4 Modified the zmq_setsockopt documentation to include the ZMQ_ROUTER_HANDOVER option 2013-11-06 23:21:28 -05:00
Erik Hugne
bbbccebbe7 zmq: add TIPC manpage
Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
2013-11-05 13:02:41 +01:00
Denis Mingulov
bdf8bc3193 Doc examples with zmq_msg_close usage - parameter is 'zmq_msg_t *'
Documentation examples for zmq_msg_get and zmq_msg_more functions have an
incorrect call to zmq_msg_close function - with 'zmq_msg_t' as a parameter
despite 'zmq_msg_t *' is required, so it is impossible to compile these
examples properly.

Also for zmq_msg_get example - declaration of zmq_msg_t variable is added
(like it is done in other examples).
2013-11-04 15:19:34 +02:00
Pieter Hintjens
c2c0f39d36 Fixed ref to zmq_socket_monitor 2013-10-28 11:48:34 +01:00
Pieter Hintjens
87718c6102 Clarified use of secret/public keys 2013-10-23 16:03:40 +02:00
Pieter Hintjens
09426ff308 Fixed man page for CURVE key options 2013-10-23 12:04:40 +02:00
Laurent Alebarde
984c2e94e4 small fix inzmq_proxy_steerable doc 2013-10-18 16:40:21 +02:00
Laurent Alebarde
99b13638eb add doc to zmq_proxy_steerable 2013-10-18 16:35:54 +02:00
Jens Henrik Hertz
f0a0e4d817 Update zmq_msg_init_data.txt 2013-10-14 20:27:23 +02:00
Pieter Hintjens
50a1973ee6 Identity can only be set on sockets that can connect to ROUTER 2013-10-09 19:53:18 +02:00
Brandon Carpenter
ae7fad48a8 Add note on Linux abstract namespace to ipc documentation. 2013-10-07 10:41:20 -07:00
Dylan Cali
0b4ce80853 fix minor typo in zmq_ctx_get doc example 2013-10-02 02:59:44 -05:00
Pieter Hintjens
fd4d125d8e Packaging for zmq_curve_keypair function
* Added new man page for this
* Added test case, in tests/test_security_curve.cpp
* Noted in zmq_utils.h that these methods are documented
2013-09-30 15:14:02 +02:00
Pieter Hintjens
5e609be345 Renamed new socket options to be clearer
* ZMQ_REQ_STRICT was negative option (default 1) which goes against
  the standard, where defaults are zero. I renamed this to
  ZMQ_REQ_RELAXED.

* ZMQ_REQ_REQUEST_IDS felt clumsy and describes the technical solution
  rather than the problem/requirement. I changed to ZMQ_REQ_CORRELATE
  which seems more explicit.
2013-09-20 15:30:04 +02:00
Pieter Hintjens
0997a8b753 Removed inaccurate note in zmq_poll man page 2013-09-20 14:39:35 +02:00
Pieter Hintjens
71c9ae8b18 Built zmq_send_const man page properly 2013-09-20 14:28:06 +02:00
Pieter Hintjens
9e66685c08 Reformatted text 2013-09-17 13:33:27 +02:00
Pieter Hintjens
576e3ca5e0 Added z85 codec to ZMQ API
* Removed redundant Z85 code and include files from project
* Simplified use of headers in test cases (now they all just use testutil.hpp)
* Export zmq_z85_encode() and zmq_z85_decode() in API
* Added man pages for these two functions
2013-09-15 20:13:44 +02:00
Pieter Hintjens
345bf146f1 Fixed overwrite in zmq_getsockopt
On ZMQ_CURVE_xxxKEY fetches, would return 41 bytes into caller's 40-byte
buffer. Now these fetches only return 41 bytes if the caller explicitly
provides a 41-byte buffer (i.e. the option size is 41).
2013-09-12 18:03:23 +02:00
Richard Newton
ccf0e61b77 Merge remote-tracking branch 'upstream/master' 2013-09-10 13:30:11 +01:00
Richard Newton
64e1c181f7 Implement non-blocking shutdown command that unblocks other threads waiting on blocking operations. 2013-09-10 13:30:00 +01:00
Martin Hurton
25c89cace1 Merge pull request #649 from hintjens/master
Fixed minor error in NULL mechanism (spec was wrong)
2013-09-09 12:12:36 -07:00
Pieter Hintjens
6725c4644f Added ZMQ_ZAP_DOMAIN socket option
* This is passed to the ZAP handler in the 'domain' field

* If not set, or empty, then NULL security does not call the ZAP handler

* This resolves the phantom ZAP request syndrome seen with sockets where
  security was never intended (e.g. in test cases)

* This means if you install a ZAP handler, it will not get any requests
  for new connections until you take some explicit action, which can be
  setting a username/password for PLAIN, a key for CURVE, or the domain
  for NULL.
2013-09-09 20:40:34 +02:00
Sebastien Pierre
f9188841b0 Clarified zmq_socket.txt ZMQ_STREAM section, added example 2013-09-04 14:58:07 -04:00
Guido Goldstein
455739f942 Fixed markup so documentation can be built. 2013-08-29 09:35:17 +02:00
Ian Barber
d485404aab Merge pull request #626 from dkrikun/master
Add ZMQ_CONFLATE socket option
2013-08-20 14:37:52 -07:00
danielkr
f59c1a5c5a Update doc for ZMQ_CONFLATE socket option 2013-08-17 23:55:00 +03:00
Uli Köhler
e23d3963d3 Fix doc typo 2013-08-17 20:39:10 +02:00
Uli Köhler
e2c322cf80 Implemented zmq_send_const 2013-08-17 20:22:50 +02:00
Christian Kamm
423ca36b17 Rename ZMQ_REQ_SEND_RESETS -> ZMQ_REQ_STRICT.
It defaults to enabled. Switch it off to be able to send a new message
before the previous reply has been received.
2013-08-03 14:35:18 +02:00
Christian Kamm
a0cc87a9d9 Add ZMQ_REQ_SEND_RESETS option.
This allows making a new request on a REQ socket by sending a new
message. Without the option set, calling send() after the first message
is done will continue to return an EFSM error.

It's useful for when a REQ is not getting a response. Previously that
meant creating a new socket or switching to DEALER.
2013-07-28 11:43:38 +02:00
Christian Kamm
b9646f2aac Add ZMQ_REQ_REQUEST_IDS option.
* Documentation:
The default behavior of REQ sockets is to rely on the ordering of messages
to match requests and responses and that is usually sufficient. When this option
is set to 1, the REQ socket will prefix outgoing messages with an extra frame
containing a request id. That means the full message is (request id, 0,
user frames...). The REQ socket will discard all incoming messages that don't
begin with these two frames.

* Behavior change: When a REQ socket gets an invalid reply, it used to
  discard the message and return EAGAIN. REQ sockets still discard
  invalid messages, but keep looking at the next one automatically
  until a good one is found or there are no more messages.
* Add test_req_request_ids.
2013-07-26 21:38:21 +02:00
Pieter Hintjens
7041770108 Added Z85 support
The use of binary for CURVE keys is painful; you cannot easily copy
these in e.g. email, or use them directly in source code. There are
various encoding possibilities. Base16 and Base64 are not optimal.
Ascii85 is not safe for source (it generates quotes and escapes).

So, I've designed a new Base85 encoding, Z85, which is safe to use
in code and elsewhere, and I've modified libzmq to use this where
it also uses binary keys (in get/setsockopt).

Very simply, if you use a 32-byte value, it's Base256 (binary),
and if you use a 40-byte value, it's Base85 (Z85).

I've put the Z85 codec into z85_codec.hpp, it's not elegant C++
but it is minimal and it works. Feel free to rewrap as a real class
if this annoys you.
2013-06-28 22:10:22 +02:00
Pieter Hintjens
dd14d4e01b Minor whitespace fixes in man page 2013-06-28 10:16:56 +02:00
Pieter Hintjens
ad77937956 Added ZMQ_STREAM socket type
- designed for TCP clients and servers
- added HTTP client / server example in tests/test_stream.cpp
- same as ZMQ_ROUTER + ZMQ_ROUTER_RAW + ZMQ_ROUTER_MANDATORY
- includes b893ce set ZMQ_IDENTITY on outgoing connect
- deprecates ZMQ_ROUTER_RAW
2013-06-27 20:53:15 +02:00
Pieter Hintjens
fb43d5a0fe Whitespace fix to man page 2013-06-22 13:39:24 +02:00
Pieter Hintjens
10f69c1500 Clarified man pages on mixed security 2013-06-20 18:30:30 +02:00
Pieter Hintjens
d9bb16725e Added options for CURVE security
- ZMQ_CURVE_PUBLICKEY for clients and servers
- ZMQ_CURVE_SECRETKEY for clients
- ZMQ_CURVE_SERVERKEY for clients
- ZMQ_CURVE_SERVER for servers
- added tools/curve_keygen.c as example
- updated man pages
2013-06-20 18:09:12 +02:00
Pieter Hintjens
656ff5b208 Small fixes to documentation
- REQ and REP sockets don't have HWM issues
- ZMQ_DONTWAIT applies to DEALER and PUSH only
2013-06-07 13:28:47 +02:00
Pieter Hintjens
a9679da764 Packaging on ZMQ_PROBE_ROUTER
- renamed to ZMQ_PROBE_ROUTER
2013-06-05 15:55:15 +02:00
Pieter Hintjens
2344131db3 Packaging of ZMQ_PROBE
- Cleaned up man page a little
- Wrote test case tests/test_router_probe.cpp
2013-06-05 15:29:40 +02:00
Pieter Hintjens
dbd58f8e15 Fixed out-of-date reference 2013-06-05 15:29:40 +02:00
shripchenko
9c980e17dd changed option name. +documentation changes 2013-06-05 15:29:40 +02:00
shripchenko
97324398a7 refactored ZMQ_ROUTER_ANNOUNCE_SELF code. renamed it to ZMQ_PROBE_NEW_PEERS.
implement it for DEALER tocket.
+documentation
2013-06-05 15:29:40 +02:00
shripchenko
f805e4dd03 changed option name. +documentation changes 2013-05-24 07:09:53 -07:00
shripchenko
51750a7d2a refactored ZMQ_ROUTER_ANNOUNCE_SELF code. renamed it to ZMQ_PROBE_NEW_PEERS.
implement it for DEALER tocket.
+documentation
2013-05-23 01:49:40 -07:00
Pieter Hintjens
fa5c0e18e3 Trivial fix to man page 2013-05-18 11:53:10 +01:00
Pieter Hintjens
e1f797b048 Added configuration for PLAIN security
* ZMQ_PLAIN_SERVER, ZMQ_PLAIN_USERNAME, ZMQ_PLAIN_PASSWORD options
* Man page changes to zmq_setsockopt and zmq_getsockopt
* Man pages for ZMQ_NULL, ZMQ_PLAIN, and ZMQ_CURVE
* Test program test_security
2013-05-15 17:55:21 +02:00
Pieter Hintjens
8ea779c8f7 Fixed sizeof usage in man pages 2013-05-15 14:11:22 +02:00
Pieter Hintjens
7e129a405c Clarified zmq_msg_close not needed after zmq_msg_send 2013-04-27 14:53:14 +02:00
Pieter Hintjens
67e02ca8bc Use of named authors on man pages is no longer a good idea since it puts off
contributors and doesn't reflect the real process. I've taken out all named
authors and referred to the contribution policy. Hopefully this will improve
the contributions to the man pages.
2013-04-15 18:50:42 +02:00
Pieter Hintjens
6d19e400f1 Added clarification about connect on ROUTER 2013-04-11 09:48:41 +02:00
Pieter Hintjens
16f8ea3e95 Clarified HWM=0 means infinite 2013-03-17 11:30:49 +01:00
Pieter Hintjens
8358d4e832 Renamed ZMQ_DELAY_ATTACH_ON_CONNECT_COULD_THIS_BE_ANY_LONGER to ZMQ_IMMEDIATE 2013-03-12 16:11:19 +01:00
Pieter Hintjens
898ad19851 It's its not it's 2013-03-12 13:24:57 +01:00
Guido Goldstein
d78d4972ae Adapted man page to API. 2013-03-08 16:58:04 +01:00
Pieter Hintjens
8ab3c4a1bf Fixed issue #500 2013-01-31 21:52:30 +01:00
Pieter Hintjens
309740e197 Fixed issue #499 2013-01-31 20:47:45 +01:00
Henrik
7918175717 Shortening the =-chars to make asciidoc work 2013-01-19 18:02:24 +01:00
MinRK
edd43e1ca4 deprecate zmq_ctx_destroy in favor of zmq_ctx_term
in order to avoid logical collisions with pre-existing notions of context destruction in bindings (czmq, pyzmq).
2013-01-17 15:48:18 -08:00
Pieter Hintjens
bbc5befc66 Clarified zmq_bind on icp:// 2013-01-14 17:49:19 +01:00
Pieter Hintjens
b0f0d3fcb4 Clarification on zmq_msg_more 2013-01-08 09:08:02 +01:00
Pieter Hintjens
12a648db07 Specified that it's safe to call zmq_msg_more after zmq_msg_close 2013-01-08 09:08:01 +01:00
Pieter Hintjens
af934f85ca Removed use of deprecated API methods 2013-01-08 09:08:01 +01:00
John Muehlhausen
d32e392278 allow XSUB/XPUB to send/recv messages unrelated to sub/unsub (LIBZMQ-490)
zmq::xpub_t::xread_activated() – change to process messages without 0
or 1 prefix, but without affecting subscriptions

zmq::xsub_t::xsend() – change to send rather than discard messages
without 0 or 1 prefix, but without affecting subscriptions

Update documentation
2013-01-07 22:24:24 -06:00
Stefan Radomski
66c22456b9 Close pipes for inproc sockets on zmq_disconnect
- fixes LIBZMQ-476 and LIBZMQ-475
2012-12-04 15:14:21 +01:00
Ian Barber
be4cc2f80a Update zmq_tcp to include a reference to RFC
Include a note with a link to ZMQ RFC 15 for the ZMTP protocol
description.
2012-11-20 19:13:28 +00:00
Pieter Hintjens
1489857973 Fixed ZMQ_SNDHWM description 2012-11-19 16:32:58 +09:00
Pieter Hintjens
7533ebb33d Clarified that SNDHWM is per part, not message 2012-11-19 10:20:56 +09:00
Pieter Hintjens
6290054f00 Added ROUTER-ROUTER as legal combination 2012-11-09 21:10:34 +09:00
Pieter Hintjens
872ef76f3c Added DEALER-DEALER as legal combination 2012-11-07 17:23:37 +01:00
Pieter Hintjens
777c38ae32 Renamed raw option to ZMQ_ROUTER_RAW 2012-11-06 13:18:58 +01:00
Pieter Hintjens
79da450b8b Fixed formatting in man page 2012-10-31 04:35:15 +01:00
Pieter Hintjens
171897f4e8 Cleanups to man pages 2012-10-27 09:43:19 +09:00
Pieter Hintjens
066606322c Added unbind/disconnect man pages, notes to deprecated methods 2012-10-19 16:23:21 +09:00
Pieter Hintjens
a3889d00c3 Fixed issue #451 2012-10-19 15:09:52 +09:00
Pieter Hintjens
983ee761b1 Renamed ZMQ_ROUTER_BEHAVIOR to ZMQ_ROUTER_MANDATORY for clarity 2012-10-08 16:36:35 +09:00
Ian Barber
db690e3d99 Merge pull request #435 from hintjens/master
Added ZMQ_XPUB_VERBOSE option
2012-10-07 12:48:18 -07:00
Pieter Hintjens
f87bf38293 Fixed issue #443 2012-10-08 00:57:43 +09:00
Vaughan Newton
ce53fe0337 Minor documentation fix: zmq_msg_recv instead of zmq_msg_send 2012-10-06 13:15:17 +02:00
Lourens Naudé
8a57e4a5d7 Merge branch 'master' into fix-monitor 2012-09-21 12:55:01 +01:00
Lourens Naudé
759d453368 Significantly reworked the monitoring infrastructure with a more granular per socket API and to play well with monitoring endpoints in application threads 2012-09-21 12:53:31 +01:00
Vaughan Newton
f6a840b65b Update doc/zmq_msg_get.txt 2012-09-20 21:39:45 +03:00
Pieter Hintjens
5db28752f3 Removed 'device' concept and introduced proxies
* zmq_device is now a wrapper that calls zmq_proxy
* zmq_proxy adds capture socket
2012-09-07 18:38:50 +09:00
Pieter Hintjens
aaac4b84cb Code cleanups 2012-09-06 18:20:33 +09:00
Ian Barber
fd67cd810a Update ROUTER_BEHAVIOR documentation
Include a note about potential interactions with reactors, and update
reference to old FAIL_UNROUTABLE name.
2012-08-26 17:48:52 +01:00
Martin Hurtoň
77dd0a6fba Merge pull request #394 from hintjens/master
Fixed HWM doc on ZMQ_PULL
2012-07-04 05:20:51 -07:00
Pieter Hintjens
8d96a43975 Fixed documentation of HWM on ZMQ_PULL 2012-07-04 17:46:08 +09:00
Lourens Naudé
9ccbeb84fa Let docs for zmq_ctx_set_monitor() respect a 80 char wide column width 2012-06-26 19:35:59 +01:00
Kobolog
829d0003be Verbose ROUTER socket behavior patch 2012-06-17 02:33:43 +04:00
Hiten P
a96dcfb29a Correct typo: add missing single quote. 2012-06-14 10:52:44 +01:00
Pieter Hintjens
076e081de2 Merge pull request #373 from ianbarber/master
Add ZMQ_DELAY_ATTACH_ON_CONNECT sockopt
2012-06-12 14:18:51 -07:00
Ian Barber
704b952274 Add reference to the inproc documentation
The previous note in connect introduced but did not elaborate on the
requirement to bind before connect in inproc. As that discussion is in
detail in the inproc docs link to there.
2012-06-12 15:49:18 +01:00
Ian Barber
7b78ed9d60 Update bind and connect documentation for clarity
Based on discussion with Steve O on the list, make the difference
between bind and connect usage more clear, and add a note reflecting the
fact that inproc must have bind before connect to reinforce the
information in zmq_inproc.
2012-06-12 15:46:26 +01:00
Ian Barber
e5904e63ce Allow blocking while connect() is completing
This patch, salvaged from a trainwreck accidental merge earlier, adds a
new sockopt, ZMQ_DELAY_ATTACH_ON_CONNECT which prevents a end point
being available to push messages to until it has fully connected, making
connect work more like bind. This also applies to reconnecting sockets,
which may cause message loss of in-queue messages, so it is sensible to
use this in conjunction with a low HWM and potentially an alternative
acknowledgement path.

Notes on most of the individual commits can be found the repository log.
2012-06-12 15:34:48 +01:00
Ian Barber
95cbad3841 Revert "After speaking with Ben Gray and the discussion on the mailing list, this is an attempt to create a sockopt to allow connecting pipes to not immediately be available for traffic. The problem is in a PUSH to many PULL situation, where there is a connect to a PULL which is not there. This connect will immediately create a pipe (unlike bind), and traffic will be load balanced to that pipe. This means if there is a persistently unavailable end point then the traffic will queue until HWM is hit, and older messages will be lost."
This reverts commit fe3fb419fe.
2012-06-12 14:53:57 +01:00
Ian Barber
fe3fb419fe After speaking with Ben Gray and the discussion on the mailing list, this is an attempt to create a sockopt to allow connecting pipes to not immediately be available for traffic. The problem is in a PUSH to many PULL situation, where there is a connect to a PULL which is not there. This connect will immediately create a pipe (unlike bind), and traffic will be load balanced to that pipe. This means if there is a persistently unavailable end point then the traffic will queue until HWM is hit, and older messages will be lost.
This patch adds a sockopt ZMQ_DELAY_ATTACH_ON_CONNECT, which if set to 1 will attempt to preempt this behavior. It does this by extending the use of the session_base to include in the outbound as well as the inbound pipe, and only associates the pipe with the socket once it receives the connected callback via a process_attach message. This works, and a test has been added to show so, but may introduce unexpected complications. The shutdown logic in this class has become marginally more awkward because of this, requiring the session to serve as the sink for both pipes if shutdown occurs with a still-connecting pipe in place. It is also possible there could be issues around flushing the messages, but as I could not directly think how to create such an issue I have not written any code with regards to that.

The documentation has been updated to reflect the change, but please do check over the code and test and review.
2012-06-01 17:58:19 +01:00
Steven McCoy
75df0194bf Fix title on zmq_disconnect manpage. 2012-05-30 12:53:53 -04:00
Pieter Hintjens
2ab12efe11 Fixing issue #361 2012-05-28 11:01:21 +02:00
Lourens Naudé
b85ff17822 Fix too long underline in monitor docs 2012-05-24 09:39:48 +01:00
Lourens Naudé
400f6f3863 Rename monitor documentation source file to match zmq_ctx_set_monitor() API 2012-05-23 01:35:22 +01:00
Lourens Naudé
adf7a7ade1 Merge branch 'master' into monitor-regressions 2012-05-22 23:35:30 +01:00
Lourens Naudé
991b7fcc04 Rename zmq_monitor to zmq_ctx_set_monitor for compat with existing context specific APIs 2012-05-22 20:15:18 +01:00
Lourens Naudé
04f0e7f26e Documentation for zmq_monitor 2012-05-22 20:08:02 +01:00
Pieter Hintjens
604456a8b0 Man page for zmq_ctx_new had error, fixed 2012-05-21 15:59:55 -05:00
Ricardo Catalinas Jiménez
0e053e3478 Doc improvement: document interface omission in zmq_pgm.txt
The PGM transport supports the omission of the network interface to
select the default one like:

  announce.connect("epgm://eth0;239.255.128.46:64646"); // Use eth0
  announce.connect("epgm://239.255.128.46:64646"); // Use the default

Also, mention C++ in the additional community bindings of 0MQ in
zmq.txt.
2012-05-21 14:06:34 +02:00
Lourens Naudé
e13b3723b8 Rename type zmq_monitor_fn -> zmq_monitor for a more natural callback definition API (zmq_monitor type, monitor.function callback) 2012-05-20 18:27:59 +01:00
Lourens Naudé
06cce15479 Change zmq_monitor_fn type to cast between pointer-to-object and pointer-to-function in a more standards compliant way 2012-05-20 18:22:13 +01:00
KennyTM~
c995de6584 Allow the ZMQ_MONITOR code compilable on gcc 4.7 on Linux.
The current ZMQ_MONITOR code does not compile in gcc 4.7, as -pedantic
and -Werror are enabled, and ISO C++ doesn't allow casting between
normal pointers (void*) and function pointers, as pedantically their
size could be different. This caused the library not compilable. This
commit workaround the problem by introducing one more indirection, i.e.
instead of calling

    (void *)listener

which is an error, we have to use

    *(void **)&listener

which is an undefined behavior :) but works on most platforms

Also, `optval_ = monitor` will not set the parameter in getsockopt(),
and the extra casting caused the LHS to be an rvalue which again makes
the code not compilable. The proper way is to pass a pointer of function
pointer and assign with indirection, i.e. `*optval_ = monitor`.

Also, fixed an asciidoc error in zmq_getsockopt.txt because the `~~~~`
is too long.
2012-05-13 20:49:05 +08:00
Lourens Naudé
d0461752ff Merge branch 'master' into events 2012-05-11 22:08:17 +01:00
Ian Barber
e65d228f4f gitignore endpoint test and add docs for unbind and disconnect 2012-05-11 14:17:45 +01:00
Lourens Naudé
5c6f72c17c ZMQ_MONITOR socket option registers a callback / event sink for changes in socket state 2012-05-04 02:32:46 +01:00
Ian Barber
b7c9fc0750 Slight tweak to text for readability 2012-04-27 11:22:17 +01:00
Paul Colomiets
138def0b99 Added refinement for ZMQ_FD option 2012-04-27 12:55:17 +03:00