Age | Commit message (Collapse) | Author |
|
|
|
- couple of comments adjusted
- empty 'stack delimiter' message correctly closed
- non-reachable function xrep_t::rollback() removed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
POSIX threads support is checked using the AX_PTHREAD macro, this
provides improved support and coverage of different platforms. The M4
macros are also moved into the M4 directory.
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
While --with-poller configure option could be used for selecting
the polling mechanism for I/O threads (asynchronous), synchronous
polling (xs_poll, signaler_t) was not affected by the option.
This patch uses selected mechanism is it is either 'select' or 'poll'.
Othrwise it chooses the mechanism according to the platform.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Fixed a couple of mixed signed/unsigned comparison which in conjunction
with -Werror prevented compilation of the test.
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
thread_t is one of the classes where C++ syntax creates more
problems then it solves. This patch converts it into simple
C-style pseudo-class.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Till now the subscription, as specified by the user, was send
upstream.
This patch allows SUB-side filter to transform the user subscription
into wire subscription. For example, only a has can be sent upstream
instead of a perfect subscription.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
This patch propoagates the error from signaler and mailbox
initialisation up the stack.
To achieve this signaler and mailbox classes were re-written
is C-like syntax.
Finally, shutdown_stress test now ignores EMFILE/ENFILE errors.
Thus, the tests should pass even on OSX which sets the max
number of file descriptors pretty low by default.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
- subscription forwarding is handled by XSUB socket
- filtering is handled by SUB sockets
- subscriptions are decoupled from filter engines
- filter doesn't have to be able to enumarate the subscriptions
(no sf_enumerate function)
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Define _GNU_SOURCE in addition to the __BSD_VISIBLE on the freebsd-like
hosts. It made in hope to cover cases and obtain the full power of
underlying kernel on "hybrid" systems like Debian GNU/kFreeBSD, when
GLibc (or derived) library lives on top of FreeBSD kernel.
On the "real" FreeBSD it only enables getline(3), and therefore, should
not hurt.
* configure.ac: Define _GNU_SOURCE in addition to the __BSD_VISIBLE for
cover GLibc (or derived) on top of FreeBSD kernel cases, as it is in
Debian GNU/kFreeBSD case.
|
|
* src/stream_engine.cpp (stream_engine_t::stream_engine_t):
Use
#ifdef SO_NOSIGPIPE
instead of
#if defined XS_HAVE_OSX || defined XS_HAVE_FREEBSD
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
This patch introduces 1/2 second tolerance for the timeouts in the tests.
This will hopefully make tests not fail even on slow or heavily loaded
machines.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
This patch consolidates the up-to-now scattered code that
sets different options on newly created sockets.
There are open_socket and open_tcp_socket functions that
do the tuning automatically.
In case the socket is not created but got from elsewhere
(such as accept() call) there are tune_socket and tune_tcp_socket
functions that will do the tuning.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
On Windows, HANDLE_FLAG_INHERIT is equivalent to
O_CLOEXEC on UNIX.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
on laggy networks
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
The /dev/poll facility wasn't correctly recognized because of a missing
header. The check was fixed and overhauled in the process.
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
While TCP and IPC socket duplicates are correctly closed on
fork+exec, file descriptors used for internal communication
within libxs are not. This patch fixes the problem.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
If accept() call fails due to insuffient OS resources
the new connection is rejected.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
The socket connecting using the inproc transport never
received the identity of the remote peer.
|
|
The scoket implementation for inproc transfer failed to flush
identity message. The result was that the identity message
was not delivered until after the user sent the first message.
The identity message was never delivered if the user
used the socket only to receive messages.
|
|
|
|
libxs (as opposed to libzmq) requires at least one I/O thread per
context. Thus, "no I/O thread available" error doesn't make sense
anyome.
This patch removes the code and the documentation.
It keeps the definition of EMTHREAD itself for backward compatibility.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Previous patch have broken flushing a delimiter in pipe_t::terminate()
function. This patch allows the flush to happen even if pipe state
is set to 'terminated'.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
* src/pipe.cpp (flush): Fix bogus typo: '&&' was used instead of '||'
|
|
|
|
|
|
This patch introduces following features:
- XS_PLUGIN context option to add plugins to libxs
- XS_FILTER option to switch between different filter types
- Automatic loading of plug-ins is *not* implemented.
From the implementation point of view:
- standard prefix filter is implemented as a pluggable filter
- trie_t and mtrie_t are joined into a single class
- the code for 0MQ/3.1 compatibility is left in in the form of comments
- new test for testing re-subscriptions is added
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Although not a POSIX behaviour, FreeBSD can fail with ECONNRESET.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
- XS_PROTOCOL option added
- libxs ignores when unused flags are set to 1 (0MQ/2.1 bug)
- compatibility tests added
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
The existing code for definining the XS_HAVE_* macros for the polling
mechanism may fail if the platform's `tr' command does not support the
GNU syntax. Replacing the hand-made declaration with autoconf macros
yields the same results on all platforms.
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
- Use consistent quoting in M4 macros
- Use portable M4sh shell constructs where possible
- More consistent indentation and line wrapping
- Split lists of files or functions on multiple lines to simplify adding
and removing elements from them
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Lucina <martin@lucina.net>
|
|
This option allows to turn on TCP keepalives on the underlying connections.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
When connection with duplicate identity arrives it is ignored.
Till now it resulted in assertion.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
|