summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-06-01Assertions improvedMartin Sustrik
This patch is replaces generic xs_asserts by errno_assers and alloc_asserts as appropriate. It is based on 0MQ patch by Martin Hurton. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-31Properly handle infinite timeout in zmq_poll()Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-31Don't assume SOCKET_ERROR is -1 on WindowsMartin Hurton
2012-05-31Polling on SURVEYOR socket implementedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-29Add the PKG_CHECK_MODULES macro definition to the distributionGabriele Svelto
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
2012-05-27Make topic filter work with MSVCMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-26Topic filter implementedMartin Sustrik
The filter is build into libxs rather than being a plug-in. It's ID is XS_FILTER_TOPIC. The filter assumed that the messages are text-based and consider binary 0 to be a delimiter separating message topic from the message body. Use of the delimiter is not mandatory though. If binary zero is not present, whole message is used for matching. The topic is separated into elements using dots, e.g. "animals.dogs.fluffy". Subscriptions match individual elements. Each element can be matched by either literal string or a wildcard (*), for example: "animals.*.fluffy" matches all animals called Fluffy irrsepctive of whether they are dogs, cats or whatever. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-25IPC backlog test temporarily disabledMartin Sustrik
On NetBSD IPC backlog test hangs. This patch disables it to keep CI running. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-25Temporarily disable backlog test.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-25Implement SP wire protocolMartin Lucina
Implements the SP wire protocol, and infrastructure for legacy wire protocol support. Also added an XS_SERVICE_ID socket option to set the service id and renamed the XS_PROTOCOL option to XS_PATTERN_VERSION. The following pattern versions are supported: PAIR: v3 PUBSUB: v1 (legacy), v4 REQREP: v2 PIPELINE: v3 SURVEY: v2 Note that all existing pattern versions have been bumped by 1 to allow for use of legacy protocols (otherwise there would be no way to distinguish between e.g. PUBSUB v3 and PUBSUB v3 using SP). Signed-off-by: Martin Lucina <martin@lucina.net>
2012-05-21Adjust MSCV project for xs.h rename to xs/xs.hMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-21Fixes a conflict with XenStore (seeMartin Lucina
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668550) Signed-off-by: Martin Lucina <martin@lucina.net>
2012-05-21Issue a warning on unsupported architectures instead of failingGabriele Svelto
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
2012-05-21Expired survey returns ETIMEDOUT instead of EAGAINMartin Sustrik
Up to now, when survey in surveyor pattern expired, xs_recv() returned EAGAIN. That made it impossible to distinguish epired survey from expired receive timeout (XS_RCVTIMEO). This patch make errors different in both cases. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-21Improve error handling on WindowsSteven McCoy
2012-05-21Use global event to synchronise signaler creation on WindowsMartin Sustrik
So far, the event used for signaler creation was local to the session, so, in theory, processes in two different sessions could accidentally interconnect their signalers. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-20Install plugins under $(libdir) to simplify multi-arch packagingGabriele Svelto
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
2012-05-18Opening plug-in directory made more robustMartin Sustrik
If plugin directory doesn't exist, is a file or user has no permissions to access it, the plugins are not loaded. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-18Link to xs_shutdown added to xs(7) man pageMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-16tests/backlog added to .gitignoreMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-15pair_tcp test test improvedMartin Sustrik
The test now tests whether second connection to a single PAIR socket won't crash the process. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-15Do not crash when multiple peers connect to PAIR socketMartin Hurton
When more then one peer connected to a PAIR socket, an application aborted due to assertion failure. This patch changes the PAIR socket behaviour so that it rejects any further connection requests.
2012-05-14libzmq and tests MSVC projects added to distributionMartin Sustrik
The package (tarball, zip) was missing these MSVC projects which means libzmq and tests could not be built from the package, only from git. This patch fixes the problem. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-14Post-hoc update to 1.1.0 NEWSMartin Sustrik
This patch explains the backward incompatible change in 1.1.0. It is a post-hoc patch which will not appear in 1.1.0 tarballs. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-13Move inclusion of select() and poll() headers to a single placeGabriele Svelto
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
2012-05-12Preparation for 1.1.0 releasev1.1.0Martin Sustrik
- version bump - ABI version bump - NEWS updated Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-12Enabled plug-in loading on all hosts with support for dlopen()Gabriele Svelto
Previously the code used for loading plug-ins would be built only on Linux hosts. Now the required functions are checked for and plug-in loading code is enabled if those are present on all platforms. Using lstat() to check for file types also increases portability to hosts that do not have the dirent.d_type field. If shared libraries support is disabled plug-ins will also be automatically disabled. Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
2012-05-12Inheritance on signaler's socket on Windows switched offMartin Sustrik
Accidentally, one of the sockets in Windows signaler_t was opened usign WSASocket instead of xs::open_socket. That skipped the standard XS socket initialisation and caused the socket to be inheritable to the child processes. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-12Fix decoder to properly handle large messagesMartin Hurton
The decoder did not properly decode large messages on systems where sizeof (size_t) < sizeof (uint64_t).
2012-05-11Command throttling breaking HWM algorithms -- fixed.Martin Sustrik
When HWM was set to small value it may have happened that command indicating that pipe is ready for writing wasn't processed because of command throttling. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-11Improve command processing efficiencyMartin Sustrik
When processing commands with throttling switched off, RDTSC instruction was executed, but the result was never used. This patch eliminates the unneeded instruction. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-11Fix issue #268Martin Hurton
This patch fixes a bug in the message encoder which was responsible for computing incorrect message offset. The bug affected PGM receiver making it unable to decode inital messages.
2012-05-09Build on Windows and OpenVMS fixedMartin Sustrik
On Windows and OpenVMS there is no IPC transport. This patch fixes the problem introduced by previous patches, where the fact is not taken into account. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-09Trivial coding style fix.Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-09Whitespace fixes in pgm_socket.cppDouglas Young
2012-05-09Return an error on invalid (e)pgm:// connectionDouglas Young
This prevents the long-standing issue of an invalid pgm or epgm connection string from causing an assert when the connection is attempted and fails.
2012-05-06C prototype for xs_init fixedMartin Sustrik
The function was erroneously declared as xs_init() instead of xs_init(void). Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-06Douglas Young added to the AUTHORS fileMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-06Return error if an invalid connection string is usedDouglas Young
This patch reintroduces the behaviour that if a tcp:// or ipc:// connection string which is invalid is passed to xs_connect, then an error is reported, instead of asserting at connection time
2012-05-04Test for backlog exhaustion addedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-05-04Correct handling of connect() errors in tcp, ipc_connecter_tMartin Lucina
EAGAIN was being used as a translation value for EINPROGRESS, thus shadowing a real EAGAIN return value from the OS. This caused later assertions of "Invalid argument" in stream_engine.cpp when it attempted to use a socket which was not connected. I also add EINTR to mean EINPROGRESS, as per the POSIX and FreeBSD documentation which specifies that a connect() call interrupted due to a signal will complete asynchronously. Signed-off-by: Martin Lucina <martin@lucina.net>
2012-05-02Conditionally include header files required by select() and poll()Gabriele Svelto
Feature checks are introduced to check for all the headers required by the select() and poll() calls. Include files are then included conditionally without the use of any OS-specific directive. The change also fixes a couple of problems: - Fixed compilation under FreeBSD, NetBSD and OpenBSD when forcing the use of select() in the poller - Quieted a warning mixed-sign comparison warning on FreeBSD caused by FD_SETSIZE being declared as an unsigned constant on that OS - Removed the obsolescent AC_HEADER_TIME macro from the configure script Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
2012-05-01Revert "Implement protocol versioning (except PGM)"Martin Sustrik
This reverts commit 512f3a604924fec9d89e2b4bfd6f73aa66309fa7.
2012-04-30'own' command replaced by synchronous callMartin Sustrik
The commands was a vestige of the removed 'durable sockets' feature Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-04-30Fix premature poll reset_polloutPaul Colomiets
Signed-off-by: Paul Colomiets <paul@colomiets.name>
2012-04-29Leftover references to ZMQ removed from xs_setsockopt(3) man pageMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-04-29Implement protocol versioning (except PGM)Martin Lucina
Implements SP protocol versioning, legacy protocol support, and the following pattern protocol versions: PAIR: v2 PUBSUB: v1 (legacy), v3 REQREP: v1 PIPELINE: v2 SURVEY: v1 Engine support is only for stream_engine_t at this stage. Signed-off-by: Martin Lucina <martin@lucina.net>
2012-04-29Fix TCP/IPC socket shutdownMartin Sustrik
When socket in the process of asynchronous connect is being closed and the fact that there is no peer is found out at the same time close() may return ECONNRESET. This patch handles this situation decently. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-04-29Ian Barber moved from Credits to Authors sectionMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-04-29Refine documentation for XS_FD optionIan Barber