summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2010-12-20Yet one more fix for oversized messages.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-12-20Fix the segfault when over-sized message is rejected.Martin Sustrik
The in_progress message inside of decoder was left uninitialised in such a case. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-12-17unplugged engine tries to manipulate the pollset -- fixedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-12-17fix race condition in session initDhammika Pathirana
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
2010-12-15Fixes assertion on pipe.cpp:237 when swap fills up.Mikko Koppanen
Fixes swap::full () functionality Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2010-12-15Remove assertions from devicesMikko Koppanen
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2010-12-13add basic uri validationsDhammika Pathirana
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
2010-12-13fix overwriting errno on bind failureDhammika Pathirana
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
2010-12-09Added Recovery Interval in MillisecondsBob Beaty
For very high-speed message systems, the memory used for recovery can get to be very large. The corrent limitation on that reduction is the ZMQ_RECOVERY_IVL of 1 sec. I added in an additional option ZMQ_RECOVERY_IVL_MSEC, which is the Recovery Interval in milliseconds. If used, this will override the previous one, and allow you to set a sub-second recovery interval. If not set, the default behavior is to use ZMQ_RECOVERY_IVL. Signed-off-by: Bob Beaty <rbeaty@peak6.com>
2010-12-06All devices conflated into a single implementation.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-12-06options.type correctly set for PUB/SUB/XPUB/XSUBMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-12-05XSUB accepts (un)subscriptions in form of messages.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-12-04XPUB and XSUB socket types added.Martin Sustrik
These are just placeholders. At the moment XPUB behaves th same as PUB and XSUB as SUB. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-12-01Merge branch 'maint'Martin Sustrik
* maint: Remove unnecessary cast in kevent_delete Conflicts: src/kqueue.cpp Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-12-01Remove unnecessary cast in kevent_deleteMartin Lucina
Fixes the build on NetBSD where the compiler complains about casting NULL to (int). Signed-off-by: Martin Lucina <mato@kotelna.sk>
2010-11-29Fix thread thunker scope for MSVC.Steven McCoy
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
2010-11-27Functions passed to pthread_create are declared as extern "C"Martin Sustrik
So far these were declared as C++ static functions which was incorrect and caused warnings with SunStudio. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-25Control symbol exports using -fvisibilityMartin Lucina
On systems using GCC 4.0 or newer which support symbol visibility in shared libraries, use -fvisibility=hidden and only export explict API functions defined in zmq.cpp. We do not enable -fvisibility on MinGW since this uses a separate mechanism (__declspec). Signed-off-by: Martin Lucina <mato@kotelna.sk>
2010-11-25Typo fixed in a comment.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-19Problem with blob_t initialisation fixed.Martin Sustrik
HP's version of STL doesn't allow for initialisation of basic_string (blob_t) using NULL pointer, while SGI's implementation is OK with that. Fixed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-17Remove unnecessary conditionalMikko Koppanen
This conditional is unnecessary as BUILD_PGM can be negated in the test. Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2010-11-15Build refactoringMikko Koppanen
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2010-11-13Merge branch 'maint'Martin Sustrik
* maint: Couple of patches for AIX build
2010-11-13Couple of patches for AIX buildMartin Sustrik
- RAND_bytes function resides in crypto library - pollfd on AIX used 'reqevents' instead of events and 'retnevents' instead of 'revents' Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-12Fix a bug that zmq_poll's select backend spins when timeout=-1, due toChia-liang Kao
ptimeout not properly recalculated after first pass. Signed-off-by: Chia-liang Kao <clkao@clkao.org>
2010-11-12Merge branch 'maint'Martin Sustrik
* maint: Fix socket_t::recv() hang scenario where initial call to process_commands() eats signal Conflicts: src/socket_base.cpp
2010-11-12Fix socket_t::recv() hang scenario where initial call to process_commands() ↵Marc Rossi
eats signal Added block boolean var to second process_commands() invocation for blocking sockets instead of always using true. This prevents the process_commands() call from hanging when a message is received with an empty queue after the call to xrecv() but prior to the initial call to process_commands() invoked when ++ticks == inbound_poll_rate. Signed-off-by: Marc Rossi <mrossi19@gmail.com>
2010-11-06Coding style cleanup in mailbox.cppMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-05signaler renamed to mailboxMartin Sustrik
For historical reasons queue to transfer commands between threads was called 'signaler'. Given that it was used to pass commands rather than signals it was renamed to 'mailbox', see Erlang mailboxes. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-05slots renamed to tidsMartin Sustrik
Threads were so far identified by integers called 'slots'. This patch renames them to more comprehensible 'tid's (thread IDs). Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-04Automatically resize signalling socket buffer if fullMartin Lucina
If the socketpair used by signaler_t fills up, this can lead to deadlock. This patch provides partial resolution by attempting to resize SO_SNDBUF on the writer side, and if that fails we shall at least assert rather than hang. I've also refactored the signaler_t code to make the platform-dependent parts clearer and have tested both the MSG_DONTWAIT and standard POSIX path in recv. The Win32 implementation currently does not implement resizing as I'm not convinced that it's safe, but it will also assert like other platforms if signaler_t::send() cannot succeed. The OpenVMS implementation has been carried forward but is untested. Signed-off-by: Martin Lucina <mato@kotelna.sk>
2010-11-04Previous FD_STSIZE patch reverted.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-04FD_SETSIZE for internal polling defaults to 1024Martin Sustrik
If, when compiling 0MQ you don't set FD_SETSIZE, it defaults to 1024 rather than to 64. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-04minor typo fixedMartin Sustrik
Devpoll polling mechanism used ZMQ_HAVE_SOLRIS instead of ZMQ_HAVE_SOLARIS in one case. Fixed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-02HP-UX has no OPEN_MAX definedMartin Sustrik
devpoll_t used this constant to determine how many events to retrieve from the poller in one go. The implementation was changed not to depend on this constant. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-01select now uses Erase-Remove idiom for retired fdsMikael Helbo Kjaer
Signed-off-by: Mikael Helbo Kjaer <mhk@designtech.dk>
2010-10-30Coding style fixed for pgm_socketMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-30Name of "GNU Lesser Public License" corrected.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-27fix typo, destroy new engineDhammika Pathirana
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
2010-10-26drop connection requests with duplicate peer identityDhammika Pathirana
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
2010-10-26Build with MSVC2005 fixedMartin Sustrik
To use __rdtsc() function MSVC2005 requires including intrin.h Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-23handle decoding malformed messagesDhammika Pathirana
Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
2010-10-23Changes for MSVC OpenPGM build.Steven McCoy
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
2010-10-23Merge branch 'maint'Martin Sustrik
* maint: SunStudio fixed.
2010-10-23SunStudio fixed.Martin Sustrik
With SunStudio's implementation of STL basic_string constructor doesn't accept NULL as a parameter even though size of string is set to zero. Fixed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-18Minor comment improvement.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-17ZMQ_BACKLOG socket option added.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-17ZMQ_RECONNECT_IVL socket options added.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-16Couple of bugs in zmq_poll fixed.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-16Implementation of zmq_strerror moved from zmq.cpp to err.cppMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>