summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2012-04-06Fix bogus typo in xs::pipe_t::flush()Andrew W. Nosenko
* src/pipe.cpp (flush): Fix bogus typo: '&&' was used instead of '||'
2012-04-05XS_PLUGIN and XS_FILTER implementationMartin Sustrik
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>
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-04-040MQ/2.1 wire format compatibility implementedMartin Sustrik
- 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>
2012-03-28XS_KEEPALIVE options addedMartin Sustrik
This option allows to turn on TCP keepalives on the underlying connections. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-03-26Handle duplicate identities decentlyMartin Sustrik
When connection with duplicate identity arrives it is ignored. Till now it resulted in assertion. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-03-25Signaler's global event is now accessible by everyoneMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-03-24Fix race condition in find_endpointMartin Hurton
2012-03-24Fixed issue LIBZMQ-345 - race condition in ctx.socket/term allows segfaultPieter Hintjens
2012-03-23Add long comment about security problem on Windows platformMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-03-23Error handling during connectMartin Sustrik
Error handling of asynchronous connect for IPC was incorrectly copied from TCP transport. This patch fixes the problem. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-03-20Make REQ session state machine aware of reconnectionsMartin Sustrik
On reconnections, state machine in req_session_t is reset to the initial state. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-03-20Send identities on reconnectMartin Sustrik
When reconnection happened, identity was not resent to the peer. Fixed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-03-20Small ommision in session creation mechanismMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-03-17Use strncpy() instead of strcpy().Piotr Sikora
Signed-off-by: Piotr Sikora <piotr.sikora@frickle.com>
2012-03-17Add missing <sys/types.h> header.Piotr Sikora
Signed-off-by: Piotr Sikora <piotr.sikora@frickle.com>
2012-03-14Removed leftovers from a logging experimentMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-03-13Type of XS_MAXMSGSIZE changed to uint64_tMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-03-13'timeout' parameter in xs_poll changed to intMartin Sustrik
Originally, the parameter was of type long which is incompatible with POSIX poll() function. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-03-13MSVC build fixed; xs_utils.h includes removedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-03-13xs_utils cleanup 2/2 (remove xs_utils.h)Martin Lucina
Moved xs_stopwatch_* functions from xs_utils.cpp/xs_utils.h, and removed those files. This leaves us with a single header file for libxs. Signed-off-by: Martin Lucina <martin@lucina.net>
2012-03-13xs_utils cleanup 1/2 (minimize exported api)Martin Lucina
Reduced xs_utils to the minimum functions required (xs_stopwatch_*) xs_sleep, xs_thread_* are internal to unit tests and have been moved to testutil.hpp, useless use of xs_sleep in perf/ has been removed. Signed-off-by: Martin Lucina <martin@lucina.net>
2012-03-13Merge branch 'for-sustrik' of git.lucina.net:libxsMartin Sustrik
2012-03-13Drop libxszmq, keep only libzmq compatibility library (--enable-libzmq)Martin Lucina
This simplifies the options for new users; either use libxs APIs or build with --enable-libzmq and get libzmq 2.1 emulation. Signed-off-by: Martin Lucina <martin@lucina.net>
2012-03-13io_threads argument removed from xs_init()Martin Sustrik
The argument was changed to a context option (XS_IO_THREADS). 0MQ compatibility mode sets the option and ensures that there's at least one I/O thread present. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-03-13Check for AI_V4MAPPED and don't use it on FreeBSDGabriele Svelto
Check if the constant is defined before using it. While the constant may be defined on FreeBSD, there's no support for the functionality and specifying the flag may cause errors. Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
2012-03-08Removal of pipe from dist_t fixedMartin Sustrik
Removing the pipe may have caused problems with matching, active and eligible pipes. Some pipes may have moved from one category to another without any reason. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-03-06Fix IPC transport domain socket stream file not being removed when ↵Rob Gagnon
connection is closed
2012-03-06WSAEACCES correctly convrted into EACCESMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.cpm>
2012-02-28update lower bound flag when removing topicsBen Gray
2012-02-28Fixed a bug in the mtrie table compaction logic.Staffan Gimåker
Signed-off-by: Staffan Gimåker <staffan@spotify.com>
2012-02-26In case of duplicate identity XREP socket asserts.Martin Sustrik
This is a fail-fast mechanism to prevent undefined behaviour later on. In the future, the new connection should be closed in this case. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-25Leftover piece of experimental code removedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-22xszmq.c renamed to xszmq.cppMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-22Add zmq_version() to libxszmqMartin Lucina
Signed-off-by: Martin Lucina <martin@lucina.net>
2012-02-22Ensure libzmq.pc is installed if requiredMartin Lucina
Signed-off-by: Martin Lucina <martin@lucina.net>
2012-02-22Added optional drop-in libzmq libraryMartin Lucina
Enabled using --enable-libzmq-compat, this installs a drop-in libzmq library and headers. Not enabled by default since it will overwrite any existing libzmq install. Signed-off-by: Martin Lucina <martin@lucina.net>
2012-02-22Added libxszmq compatibility libraryMartin Lucina
Signed-off-by: Martin Lucina <martin@lucina.net>
2012-02-17Compact the trie/mtrie node tables where possible, to reduce memory usage.Staffan Gimåker
Signed-off-by: Staffan Gimåker <staffan@spotify.com>
2012-02-17Drop subscription messages when reaching the SNDHWM rather than asserting.Staffan Gimåker
This matches the behaviour of zmq_setsockopt(ZMQ_SUBSCRIBE, ...), which also silently drops subscription messages if the SNDHWM is reached. Signed-off-by: Staffan Gimåker <staffan@spotify.com>
2012-02-16Fix FD/handle conversion bugMartin Sustrik
On systems where int size != pointer size the coversion resulted in compile-time error. 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-16Some additional parameter checking for ZMQ_(UN)SUBSCRIBEMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Avoid too long timeouts in xs_pollMartin Sustrik
The timeout should be int. For historical reasons, however, it is defined as long. To fix the problem the value is checked in the runtime to assure it is not larger than INT_MAX. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16ZMQ_REENTRANT functionality removedMartin Sustrik
It doesn't play well with multipart messages. 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-16Polling mechnisms updated to cope with io_thread_t removalMartin 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-16Intercept start() and stop() calls in poller_base_tMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16xs_poll implementation moved to a separate fileMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>