1431 Commits

Author SHA1 Message Date
psl-felipefarinon
8f85bafe37 issue #583 removing C++11 code. 2013-11-19 10:58:20 +01:00
Bruno D. Rodrigues
f72dbb35d5 Fix socket creation above sistem limits for all 'other' OS not covered by eventfd, windows or vms; enhanced test to create sockets up to a bigger limit to really test hitting the OS limit 2013-11-19 10:55:48 +01:00
Martin Hurton
f6293d257d Signal that the peer performed orderly shutdown 2013-11-09 09:52:09 +01:00
Richard Newton
f33bdcf02e Fix formatting. 2013-11-09 09:52:08 +01:00
Richard Newton
bfc3deb43a Get maximum number of sockets it can handle from poller_t 2013-11-09 09:52:02 +01:00
psl-felipefarinon
dccf1dce1e Fixing broken build issue #583 2013-11-09 09:51:59 +01:00
psl-felipefarinon
27d20aacc7 Fixing issue #583. Using low resolution timer for clock::now_ms 2013-11-09 09:47:41 +01:00
Pieter Hintjens
b2698474d2 Simplified fdpair reset after fork 2013-11-09 09:47:40 +01:00
Pieter Hintjens
0465e9abe9 Simplified error handling for make_fdpair on Windows 2013-11-09 09:47:04 +01:00
Pieter Hintjens
885c816e57 Fix for issue 574 2013-11-09 09:47:02 +01:00
Richard Newton
de239f358e Fix race condition on shutdown 2013-11-06 20:16:03 +01:00
MinRK
c663f37761 add missing msg->init for ROUTER_RAW with empty message 2013-11-06 20:16:03 +01:00
Pieter Hintjens
aede37e3e5 Fixed issue 578 - corrected type usage 2013-11-04 17:34:54 +01:00
Pieter Hintjens
2949f2dbc5 Fixed issue 578 2013-11-04 17:34:14 +01:00
Martin Hurton
5490794666 Load identity message to decoder at start 2013-10-14 08:03:36 +02:00
Martin Hurton
622e3b5476 Rename engine's methods to improve code readability 2013-10-11 11:47:12 +02:00
Volodymyr Korniichuk
ca122e9d01 Typo in type name "emTPy_slots_t"
https://zeromq.jira.com/browse/LIBZMQ-565
2013-10-08 09:20:15 +02:00
Brandon Carpenter
127cd7585a Fix detection of abstract ipc pathname and length calculation.
Abstract socket pathnames must have a NULL character in the first
position, but the second character must also be checked to differentiate
an abstract name from the empty string.  The address length must also
indicate the length of the pathname because the kernel uses the entire
address as the name, including NULL characters.  ZMQ uses
NULL-terminated strings for the address, so the abstract address length
is the length of the string following the initial NULL byte plus 3; two
bytes for the address family and one for the initial NULL character.
2013-10-07 20:53:10 +02:00
Volodymyr Korniichuk
9293153f71 useless checks were removed 2013-10-05 09:22:56 +02:00
Brandon Carpenter
668f000cb1 Add abstract namespace support for IPC sockets on Linux.
Converts an initial strudel or "at sign" (@) in the Unix socket path to
a NULL character ('\0') indicating that the socket uses the abstract
namespace instead of the filesystem namespace.  For instance, binding a
socket to 'ipc://@/tmp/tester' will not create a file associated with
the socket whereas binding to 'ipc:///tmp/tester' will create the file
/tmp/tester.  See issue 567 for more information.
2013-10-05 09:20:13 +02:00
Martin Hurton
814b93e0cf Stop curve handshake when cookie box verification fails 2013-10-04 09:19:11 +02:00
Pieter Hintjens
d723b08c13 Updated libzmq CURVE to track RFC 27
* The INITIATE command vouch box is Box[C',S](C->S') instead of Box[C'](C->S),
  as recommended by https://codesinchaos.wordpress.com/2012/09/09/curvecp-1/,
  to reduce the risk of client impersonation.

* Mirrors the change in libcurve and CurveZMQ specifications.
2013-10-04 09:19:04 +02:00
MinRK
3c469d04c1 return NULL and set EINVAL on bad z85 input
asserts aren't appropriate for checking user input.
2013-10-04 09:12:33 +02:00
MinRK
870233522c add zmq_curve_keypair to zmq_utils 2013-10-04 09:12:09 +02:00
Pieter Hintjens
b0059211d5 Added test case for issue 566
* Tests dealer-to-router connection 100 times
* This was failing in ZMQ v4.0.0 RC1
2013-09-26 14:46:35 +02:00
Pieter Hintjens
5e25b32c36 Build/test errors on OS/X with clang++ 2013-09-26 12:17:28 +02:00
Martin Hurton
a5152245bd Call flush after writing the identity message 2013-09-26 10:07:29 +02:00
Pieter Hintjens
c0c8ce5508 File was missing from Makefile.am 2013-09-20 16:41:08 +02:00
Pieter Hintjens
a31fe9565a Source distribution was broken 2013-09-20 16:03:14 +02:00
Pieter Hintjens
e0676a2b26 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:50:25 +02:00
Pieter Hintjens
825052f83f Revert "makes curve keys symetric as in libcurve + factorisation"
This reverts commit bfd472f97cad5e37fa384b687a906f515600bac4.
2013-09-17 14:05:55 +02:00
Pieter Hintjens
22eb4d600b Revert "oblige the application to explicitely set the node type for PLAIN"
This reverts commit 1206f4572b4b3bb405a14cc60605b75d53b819a0.
2013-09-17 14:05:41 +02:00
Laurent Alebarde
1206f4572b oblige the application to explicitely set the node type for PLAIN 2013-09-17 12:47:21 +02:00
Laurent Alebarde
bfd472f97c makes curve keys symetric as in libcurve + factorisation 2013-09-17 12:44:14 +02:00
Pieter Hintjens
321a8ffea9 NULL mechanism was not dealing with ZAP denials properly 2013-09-16 15:09:55 +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
193d0bb634 Fixed Z85 methods to be static and not pollute library 2013-09-15 17:30:18 +02:00
Richard Newton
b9298823b4 Set hwm on connect socket before bind has happend to just that of connects hwm. 2013-09-15 13:35:44 +01:00
Richard Newton
7841b0dd0f Support high water mark on inproc socket connect before bind. 2013-09-14 17:27:18 +01:00
Richard Newton
b9c09064d5 Fix whitespace 2013-09-12 21:22:47 +01:00
Richard Newton
d5bd68b60b Merge branch 'master' of https://github.com/zeromq/libzmq into inproc_connect_before_bind 2013-09-12 21:09:30 +01:00
Richard Newton
379bcb0881 Send identities when connecting pending sockets. 2013-09-12 21:07:29 +01:00
Richard Newton
7c3496a76a Fix race condition and support multiple socket connects before bind. 2013-09-12 18:09:37 +01: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
5f20d63665 First attempt at inproc connect before bind 2013-09-12 14:44:44 +01: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
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
Pieter Hintjens
635a03d240 Was sending NULL mechanism name with extra null (fixed) 2013-09-09 19:58:18 +02:00
Pieter Hintjens
28b0a5fa27 Updated libzmq to match RFC 23, 24, 25, 26
* Command names changed from null terminated to length-specified
* Command frames use the correct flag (bit 2)
* test_stream acts as test case for command frames
* Some code cleanups
2013-09-04 17:59:45 +02:00