Age | Commit message (Collapse) | Author |
|
This reverts commit a34ea4d80609395150742259fd8c9caa4409e961.
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Lucina <martin@lucina.net>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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.
|
|
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
|
|
This reverts commit 512f3a604924fec9d89e2b4bfd6f73aa66309fa7.
|
|
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>
|
|
This patch allows for partial shutdown of the socket.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
SURVEYOR socket now uses clock instance from socket_base_t
for measuring survey timeout. This allows for better performance
in tight xs_recv() loops.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
This patch instantiate a clock_t instance for each XS
socket. Thus, it is shared between subsequent calls
to xs_recv (and xs_send). That in turn significantly
limits the number of invocations of getimeofday (or similar)
when timeouts are used and recv/send is called in a
tight loop.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
It can be used to timeout the survey. Value is in milliseconds
and -1 means infinite (default).
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Survey pattern is "multicast with reply". There are two roles:
surveyor and respondent. Surveyor publishes a survey which gets
delivered to all connected respondents. Each repondent can send
a response to the survey. All the responses are delivered to
the original surveyor. Once the surveyor decides that the survey
is over (e.g. deadline was reached) it can send initiate survey.
Late responses from old surveys are automatically discarded by
the surveyor socket.
Socket types: SURVEYOR, XSURVEYOR, RESPONDENT, XRESPONDENT
Patch also includes a test program with surveoyr, two respondents
and an intermediary device.
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>
|
|
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>
|
|
- 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>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
It doesn't play well with multipart messages.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
The relationship of these two classes was 1:1.
Thus one of them was obsolete.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
The inspiration for this re-write came form John Skaller's
patch. Adding him to Credits section of the AUTHORS file.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
zmq_close() cannot be synchronised even though ZMQ_REENTRANT is set.
It's user's responsibility not to invoke the socket from another
thread once zmq_close() have been called.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
With the introduction of subscription forwarding, the first message
sent on a PUB socket using a unidirectional transport (e.g. PGM) is
always lost due to the "subscribe to all" being done asynchronously.
This patch fixes the problem and also refactors the code to have a
single point where the "subscribe to all" is performed.
Signed-off-by: Martin Lucina <martin@lucina.net>
|
|
Timers are not longer identified by hard-wired IDs.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Poller object is virtualised. You can access poller via its
base class (poller_base_t) instead of using poller_t which
was a typedef pointing to actual derived class.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Till now the "valid" tag of the socket was removed only after
the socket was properly deallocated by the reaper thread. That
allowed user to access it while it was in the process of being
deallocated. Now, the "valid" tag is removed as soon as zmq_close
is called.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
The new function allows to retrieve options (flags)
from zmq_msg_t.
Signed-off-by: Chuck Remes <cremes@mac.com>
Renamed from zmq_msg_flags to zmq_getmsgopt
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Previous patches have missed the case when the identity should
be sent from an inproc endpoint. Fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
However, the "durable socket" behaviour wasn't re-added.
Identities are used solely for routing in REQ/REP pattern.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@turist.(none)>
|
|
This is a preliminary patch allowing for socket-type-specific
functionality in the I/O thread. For example, message format
can be checked asynchronously and misbehaved connections dropped
straight away.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|