1199 Commits

Author SHA1 Message Date
Steven McCoy
521ed91289 [#LIBZMQ-446] Silence error on setting PGM_TOS due to some platforms raising an error at runtime. Noted are RHEL 4. 2013-04-12 23:44:04 -04:00
Mika Fischer
1a17eb392e Work around for LIBZMQ-496
The problem is that other threads might still be in mailbox::send() when
it is destroyed. So as a workaround, we just acquire the mutex in the
destructor. Therefore the running send will finish before the mailbox is
destroyed.

See also the fix for LIBZMQ-281 in zeromq2-x.

Signed-off-by: Mika Fischer <mika.fischer@zoopnet.de>
2013-02-19 11:01:13 +01:00
Min(Dongmin Yu)
6a7dcfb898 LIBZMQ-497 there could be unsent bytes in encoder
When we send a large message, the message can be splitted into two chunks.
One is in the encoder buffer and the other is the zero-copy pointer.
The session could get the term before the last chunk is sent.
2013-02-01 10:03:55 +01:00
Ian Barber
92446d81ce Merge pull request #71 from hintjens/master
Backported fix for LIBZMQ-488
2012-12-27 06:16:08 -08:00
KIU Shueng Chuan
96ce417422 win32: close zmq-signaler-port-sync event object to avoid handle leak 2012-12-27 14:47:14 +01:00
Stefan Radomski
2131e85cd7 Break early when pipe to be removed was found 2012-12-04 17:41:08 +01:00
Stefan Radomski
fbfd3c34d9 Fixed iterator when erasing from inprocs multimap 2012-12-04 17:32:38 +01:00
Stefan Radomski
1965e2d05d Removal of terminated pipes from inproc and ignoring peer ends 2012-12-04 17:03:58 +01:00
Stefan Radomski
8e6fdc56e1 Changed errno to ENOENT for disconnecting unconnected endpoints 2012-12-04 14:14:46 +01:00
Stefan Radomski
b0563c2103 Set errno and update documentation on zmq_disconnect 2012-12-04 13:52:23 +01:00
Stefan Radomski
2388f27bfe Close inproc socket pairs on zmq_disconnect
This patch fixes LIBZMQ-476 and LIBZMQ-475
2012-12-04 13:14:56 +01:00
Victor Perron
6d4e2ce93b Change NULL to 0 to keep compatibility with some cross-compiling GCC
versions
2012-11-30 22:58:03 +01:00
Pieter Hintjens
bcf8916e17 Backported latest socket event framework 2012-11-23 16:42:13 +09:00
Martin Hurton
9120741719 Check decoder's state function for NULL before calling it
Fixes bug reported by Peter Friend
(http://lists.zeromq.org/pipermail/zeromq-dev/2012-November/019425.html)
2012-11-22 12:17:07 +09:00
John Muehlhausen
a7438de239 Issue 468
XPUB "verbose" mode excludes unsubscriptions
2012-11-16 10:59:37 +09:00
Lourens Naudé
c05a1b1f26 Backported fix for addresses on triggered events 2012-11-14 19:19:29 +09:00
Pieter Hintjens
30738e1123 Backported fix for ZMQ-465 2012-11-13 21:39:59 +09:00
Martin Hurton
50b6da0c1c Minor code cleanup 2012-11-13 21:39:41 +09:00
Martin Hurton
0c0a351fa5 Backported fix for ZMQ-465 2012-11-13 21:36:17 +09:00
Martin Hurton
50e9d72dc4 Resolve LIBZMQ-459
Ref: https://zeromq.jira.com/browse/LIBZMQ-459
2012-11-06 09:49:09 +01:00
Martin Hurton
fec6497976 Resolve LIBZMQ-464 2012-11-01 16:42:18 +01:00
Martin Hurton
5b9de45a89 Resolve LIBZMQ-447 2012-10-30 06:26:30 +01:00
Martin Hurton
d95f8c5f55 Resolve LIBZMQ-417
Ref: https://zeromq.jira.com/browse/LIBZMQ-417
2012-10-25 18:21:08 +09:00
AJ Lewis
888c1bdb5b Move socket_base.hpp and err.hpp after poll.h include
These two headers also include zmq.h somewhere in their dependency
chain, so must be included after poll.h is included for builds to work
on AIX.
2012-10-23 16:18:36 -05:00
Pieter Hintjens
5e4f858c8e Fixed issue #451 2012-10-19 15:10:34 +09:00
Pieter Hintjens
bdbdf8bb7e Fixed issue #449 2012-10-18 11:34:16 +09:00
Pieter Hintjens
2fe4a355fd Fixed issue #448 2012-10-18 11:10:21 +09:00
Pieter Hintjens
e18b69bfa1 Several include files were missing 2012-10-16 10:00:43 +09:00
Rohan
93a7a37893 fixed trailing whitespace 2012-10-11 09:32:54 -05:00
Rohan
a438e63498 explicit comments on multicast loopback 2012-10-10 16:22:52 -05:00
rohanbedarkar
11c22912d7 commented out TOS related opt for PGM 2012-10-10 10:08:06 -05:00
Pieter Hintjens
983ee761b1 Renamed ZMQ_ROUTER_BEHAVIOR to ZMQ_ROUTER_MANDATORY for clarity 2012-10-08 16:36:35 +09:00
Pieter Hintjens
f87bf38293 Fixed issue #443 2012-10-08 00:57:43 +09:00
Michel Pelletier
b84d0119b5 Ported from libxs revision 123c0f5387ecef287dd11f4dc790fb76ee1c0f67
Handle insufficient resources on accept() decently

    If accept() call fails due to insuffient OS resources
    the new connection is rejected.
2012-09-30 11:52:43 -07:00
Martin Hurton
82d7238f08 Make socket IO more robust
See also https://zeromq.jira.com/browse/LIBZMQ-433
2012-09-29 11:36:52 +02:00
Ivan Pechorin
725f141fd7 Fix LIBZMQ-211: REP socket asserting when getting malformed request
REP socket demands at least an empty address stack. The server asserted on (msg_->flags () & msg_t::more) in rep.cpp:75 when receiving a malformed request without empty part.

This patch makes a REP socket to discard and silently ignore such malformed requests.
2012-09-26 16:49:38 +04:00
Ivan Pechorin
9b58372a38 Fix compilation using MSVC 2008: its <algorithm> defines wrong min/max without NOMINMAX
Visual Studio 2008 compiler defines min/max as macros in its <algorithm> even if <windows.h> is not included at all. This patch defines NOMINMAX to remove these macros and fix compilation on Visual Studio 2008.
2012-09-26 16:09:55 +04:00
Ivan Pechorin
396b4e3046 Fix compilation using MSVC 2008: stdint.h is not present in this compiler
This patch fixes the two headers added recently to include our own "stdint.hpp" instead of system <stdint.h> because the latter is not available in Visual Studio versions prior to 2010.
2012-09-26 16:06:20 +04:00
Ivan Pechorin
9056c13e1e Use <stdint.h> shipped with Visual Studio 2010 and later
Visual Studio didn’t have <stdint.h> until 2010, therefore we had a bunch of typedefs for int8_t, int16_t and the likes in "stdint.hpp". This patch limits these typedefs to Visual Studio versions older than 2010 and uses compiler-shipped <stdint.h> on 2010 and newer.
2012-09-26 15:13:13 +04:00
Ian Barber
afa4933c1e Init message in drop subscription
Fixes reported issue with PGM receiver on 32bit Suse where asserts
were hit due to the msg flags not being zeroed.
2012-09-25 22:58:25 +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
Ian Barber
7a40df6d3a Merge pull request #422 from hintjens/master
Replaced device concept with proxy concept
2012-09-07 03:25:31 -07: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
Martin Hurton
2a41c8d7b4 Simplify initial handshaking 2012-09-05 20:17:34 +02:00
Martin Hurton
3f6148abdf Implement new message encoder/decoder
This is supposed to become part of the ZMTP/1.1.

The main differences from the ZMTP/1.0 framing protocol are:
- flags field comes first, followed by the length field
- long messages are signaled using a flag rather then 0xff escape
- length field does not include the flags field, 0 is a valid value
2012-09-05 20:17:22 +02:00
Martin Hurton
8672f5829e Introduce abstract interface for message encoder/decoder 2012-09-05 18:31:27 +02:00
Ian Barber
d7331b7b1f Fixing PGM issues
Hopefully fixed LIBZMQ-427 - there was a slight typo in the init_address
refactor. The encoder refactoring had also broken pgm_sender and
receiver, but just required updating to use the new functions.
2012-09-04 23:24:48 +01:00
Martin Hurton
9d17ead33d Remove superfluous statement 2012-09-03 19:26:52 +02:00
Martin Hurton
7e6db47e65 Remove unused member variable 2012-09-03 19:07:57 +02:00