summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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>
2012-02-16Socket re-entrancy rewrittenMartin Sustrik
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>
2012-02-16xs_thread_create and xs_thread_join implemented for POSIX platformsMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Race condition during socket close fixedMartin Sustrik
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>
2012-02-16Bug fixed in context terminationMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Names of context options shortenedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16XS_CTX_REENTRANT option addedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16XS_CTX_MAX_SOCKETS option implementedMartin Sustrik
To implement context options properly, initialisation of context is postponed till creation of the first socket. In the meantime it is possible to set socket options. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16More MSVC tests addedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.cpm>
2012-02-16Windows version of the tests implementedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.cpm>
2012-02-16Bug in linger implementation fixedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16handle_valid removed from tcp_connecter_t and ipc_connecter_tMartin Sustrik
Invalid handle is now specified as handle == NULL Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Fix data loss for PUB/SUB and unidirectional transports (LIBZMQ-268)Martin Lucina
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>
2012-02-16Timers identified by dynamically generated handlesMartin Sustrik
Timers are not longer identified by hard-wired IDs. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Valid handle_t is never NULLMartin Sustrik
poll_t and select_t polling mechanism convert fd into void*. When fd 0 was converted NULL pointer resulted. Fixed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16cancel_timer function renamed to rm_timerMartin Sustrik
This is more consistent with adjacent add_fd and rm_fd functions. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16i_poll_events interface moved to poller_base.hppMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16poller_base_t is used instead of poller_tMartin Sustrik
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>
2012-02-16Simplify mechanism for choosing polling mechanismMartin Sustrik
Till now the selection process was implemented both in autotools build system and in the code itself. From now on, it's exclusively build system's taks to choose the right polling mechanism. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Polling handle is a fixed type now.Martin Sustrik
Polling handle type was previously dependent on polling mechanism used. Now it is void* in all cases. This patch is a first step in the long way to separate the transports from the core library. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Message loss when a SUB socket disconnects fixedMartin Sustrik
When there are multiple subscribers connected to the same PUB socket and one of them disconnects, one of the orhers loses one message. Fixed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Redundant definition of blob_t removedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Reduce memory usage of mtrie.Staffan Gimåker
Signed-off-by: Staffan Gimåker <staffan@spotify.com> Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Invalid iterator not usedMartin Sustrik
Iterator was checked although the item it was pointing to was erased. Now it never happens. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Improve checking for the invalid socketsMartin Sustrik
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>
2012-02-16Obsolete launch_sibling function removedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Race condition in zmq_term() fixedMartin Sustrik
It was possible to open a new socket while the log socket was being shut down. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16ZeroMQ compatibility header addedMartin Sustrik
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-16Small error in a comment fixedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Subscription buffer in XSUB socket made elasticMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16TODO addedMartin Sustrik
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Allow to set up a source address for outgoing connections in zmq_connect()Sergey Matveychuk
Signed-off-by: Sergey Matveychuk <sem33@yandex-team.ru> Signed-off-by: Martin Sustrik <sustik@250bpm.com>
2012-02-16Fix bad combination of gcc3, -Werror and private destructorMichael Fox
2012-02-16The cause behind the segfault was next.node being deleted but count still ↵Staffan Gimåker
being non-zero. Signed-off-by: Staffan Gimåker <staffan@spotify.com>
2012-02-16Fixes to xs::xpub_t::xread_activatedMartin Sustrik
1. If the subscription is malformed, drop it silently. 2. Fixes a memory leak Signed-off-by: Staffan Gimåker <staffan@spotify.com> Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2012-02-16Prune redundant nodes in the trie.Staffan Gimåker
Signed-off-by: Staffan Gimåker <staffan@spotify.com>
2012-02-16Prune redundant nodes in the mtrie.Staffan Gimåker
Signed-off-by: Staffan Gimåker <staffan@spotify.com>
2012-02-16Updated connector open() doc strings.Ivo Danihelka
Signed-off-by: Ivo Danihelka <ivo@danihelka.net>
2012-02-16Patch from Mikko Koppanen for #LIBZMQ-301AJ Lewis
Add the '-Ae' flag and check for gethrtime() on HPUX Check if CLOCK_MONOTONIC defined before using it - if not, use gethrtime() if it's available, otherwise fall back to the old behavior. Signed-off-by: AJ Lewis <aj.lewis@quantum.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-16Fix assertion in pgm_sender_t::plug() (LIBZMQ-303)Martin Lucina
Opening any PGM socket gives this assertion. The problem is in pgm_sender_t::plug() which is incorrectly testing the return value from session::write(). Signed-off-by: Martin Lucina <martin@lucina.net>