Commit Graph

353 Commits

Author SHA1 Message Date
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