summaryrefslogtreecommitdiff
path: root/src/stream_engine.cpp
AgeCommit message (Collapse)Author
2012-06-13Revert "Implement SP wire protocol"Martin Sustrik
This reverts commit a34ea4d80609395150742259fd8c9caa4409e961.
2012-05-31Don't assume SOCKET_ERROR is -1 on WindowsMartin Hurton
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-01Revert "Implement protocol versioning (except PGM)"Martin Sustrik
This reverts commit 512f3a604924fec9d89e2b4bfd6f73aa66309fa7.
2012-04-30Fix premature poll reset_polloutPaul Colomiets
Signed-off-by: Paul Colomiets <paul@colomiets.name>
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-14Check for SO_NOSIGPIPE availability instead of OS nameAndrew W. Nosenko
* 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
2012-04-14If available, use MSG_NOSIGNAL for send()Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-04-11ETIMEDOUT is a valid error code here. Fixes intermittent assertion failure ↵Mikko Koppanen
on laggy networks
2012-04-04Accept ECONNRESET from close()Martin Sustrik
Although not a POSIX behaviour, FreeBSD can fail with ECONNRESET. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Full name of the project used in license headersMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16poller_base_t renamed to io_thread_tMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16io_thread_t merged with poller_base_tMartin Sustrik
The relationship of these two classes was 1:1. Thus one of them was obsolete. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16File descriptor passed to in_event and out_eventMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Stop polling for OUT immediately when no data in pipeMartin Sustrik
This patch is an optimisation. So far, when there were no data in the pipe, it was only next out_event that stopped the polling for POLLOUT. Now, the polling is canceled immediately. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16ZeroMQ renamed to CrossroadsMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-22ENOTCONN on recv() on TCP socket is treated decently (issue 254)Martin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-01Copyright dates adjusted to reflect realityMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-10-31250bpm copyrights addedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-15Session class separated into socket-type-specific sessionsMartin Sustrik
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>
2011-08-16tcp_engine renamed to stream engineMartin Sustrik
The engine was not used exclusively for TCP connections. Rather it was used to handle any socket with SOCK_STREAM semantics. The class was renamed to reflect its true function. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>