Steven McCoy
5b8af52efc
Fix assertion in PGM transports on cancel_timer
...
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
2010-10-11 17:59:58 +02:00
Martin Sustrik
f22e85f19f
Reverting commit 1d431190f50c86f62460
...
The patch was supposed to check that pipe writer sends messages
in atomic fashion. However, it prevented the user to read
half of a message and close the socket.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-11 12:23:18 +02:00
Martin Sustrik
73e7ef37c2
When XREP silently drops message, it does not empty it -- fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-10 09:23:37 +02:00
Christian Gudrian
f5030a93a5
Execute the timers before pollset initialisation.
...
Since executing the timers might modify the source pollsets we have
to defer the initialisation until after the timers have executed.
Signed-off-by: Christian Gudrian <christian.gudrian@fluidon.com>
2010-10-09 19:19:50 +02:00
Martin Sustrik
318cdd1f24
Merge branch 'maint'
...
* maint:
Version macros added
Conflicts:
builds/msvc/platform.hpp
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-09 08:03:58 +02:00
Martin Sustrik
ef8db789a1
Version macros added
...
Macro ZMQ_VERSION represents the current version of 0MQ
Macro ZMQ_MAKE_VERSION(major,minor,patch) allows to create
a representation of the specified version.
The versions can be compared using simple <, >, ==, etc.
operators.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-09 07:53:24 +02:00
Martin Lucina
214b56077a
Fix missing platform.hpp in zmq_connecter.cpp
...
Missed testing on Win32
Signed-off-by: Martin Lucina <mato@kotelna.sk>
2010-10-08 22:06:41 +02:00
Martin Sustrik
daf5d3273b
More cleanup of session termination process.
...
Fix in termination of session attached to a REP socket.
Several fixes of session termination in case of disconnection.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-08 21:42:55 +02:00
Martin Lucina
f90c8d957e
Scalability improvements for large amounts of connections
...
Add signaler_sndbuf_size option to config.hpp which allows the user to
increase the size of the send buffer used by the signalling socketpair.
Implement random backoff for reconnection attempts using a primitive
pseudo-random generation to prevent reconnection storms.
Add wait_before_connect option to config.hpp to allow the user to enable
random delay even on initial connect. Default is false for low latency.
Signed-off-by: Martin Lucina <mato@kotelna.sk>
2010-10-08 17:49:40 +02:00
Martin Sustrik
7a685b0f88
Clean-up of session termination process
...
Specifically, shutdown of child objects is initiated *before* termination
handshake with socket object.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-08 17:23:21 +02:00
Nir Soffer
1d431190f5
make sure that reader does not terminate in the middle of a multipart message
2010-10-02 10:01:18 +02:00
Martin Sustrik
2142b8918a
issue 92 -- Assertion failed: inpipe && outpipe (pair.cpp:86) -- fixed
2010-10-01 18:46:32 +02:00
Martin Sustrik
2a85cce189
Merge branch 'master' of github.com:zeromq/zeromq2
2010-10-01 13:37:59 +02:00
Martin Sustrik
0bb76b667b
assert when xrep socket gets reconnected in the middle of the shutdown -- fixed
2010-10-01 13:37:46 +02:00
Martin Lucina
8f9080ebb9
zmq_poll(): Fix busy-loop if timeout is zero
...
Fix a case where zmq_poll() (poll-based version) could go off into a busy-loop
if no revents are returned and the timeout passed in is zero.
2010-09-30 15:30:24 +02:00
Martin Sustrik
ac9b05c36b
Merge branch 'maint'
...
* maint:
zmq_msg_move called on uninitialised message in xrep_t::xrecv -- fixed
2010-09-30 15:12:06 +02:00
Max Wolf
79aea5ffa6
zmq_msg_move called on uninitialised message in xrep_t::xrecv -- fixed
2010-09-30 15:10:47 +02:00
Martin Sustrik
98fa2fa802
fix in XREP's fair queueing mechanism
2010-09-30 14:03:54 +02:00
Martin Sustrik
7881ba1bcd
minor whitespace fix
2010-09-30 11:35:14 +02:00
Steven McCoy
eaa925eca7
FreeBSD doesn't define MSG_ERRQUEUE -- now it's defined in 0MQ
2010-09-30 11:33:35 +02:00
Steven McCoy
d14be62499
more fixes to (e)pgm transport
2010-09-30 09:11:51 +02:00
Steven McCoy
96d85b2098
* Add assertions to check for OpenPGM calls with invalid parameters.
...
* Assertion to check that pgm_getaddrinfo is actually returning something.
* Missing pgm_connect call.
* Typo on TOS causing immediate abort.
* Placeholder calls for timeouts whilst continuing spin loop functionality.
* OpenPGM v5 now supports reference counting so remove init checks.
* Duplicate UDP unicast port setting, requires one unicast and one multicast.
* Incorrectly set socket rcvbuf size with sndbuf.
* Replace std::lexicographical_compare of TSI's with long word integer comparisons.
* pgm_socket_t::receive returns -1 on no data.
2010-09-30 09:11:19 +02:00
Steven McCoy
00cd7d49c7
Upgrade to OpenPGM-5.0.78
2010-09-28 16:35:29 +02:00
Gonzalo Diethelm
87beaaa00d
ZMQ_TYPE socket option added
2010-09-28 15:27:45 +02:00
Martin Sustrik
6715f9b185
Merge branch 'maint'
...
* maint:
crash when closing an ypipe -- fixed
2010-09-28 07:51:59 +02:00
Dhammika Pathirana
c1deb226f4
crash when closing an ypipe -- fixed
2010-09-28 07:46:17 +02:00
Martin Sustrik
f61921d096
REQ socket can die when reply is delivered on wrong unerlying connection -- fixed
2010-09-28 07:39:16 +02:00
Martin Sustrik
16c3884a61
MSVC build fixed
2010-09-27 11:18:21 +02:00
Martin Sustrik
30c1cba4e4
latency optimisation for the case where there are no timers
2010-09-27 09:34:00 +02:00
Martin Sustrik
238640a526
timers properly implemented
2010-09-26 21:42:23 +02:00
Martin Sustrik
8d7bf6684c
common base for all pollers created; the only thing it handles at the moment is 'load'
2010-09-26 19:22:33 +02:00
Martin Sustrik
cf815e8c78
new interfaces for timers; the implementation is not changed yet
2010-09-26 18:30:03 +02:00
Martin Sustrik
be79a9fbc2
minor beautifications
2010-09-26 18:01:59 +02:00
Martin Sustrik
5dae27d0ed
clock_t class added
2010-09-26 16:55:54 +02:00
Martin Sustrik
7d5061798c
Merge branch 'maint'
...
* maint:
if TSC jumps backwards (in case of migration to a different CPU core) latency peak may occur -- fixed
Conflicts:
src/app_thread.cpp
2010-09-26 13:36:05 +02:00
Martin Sustrik
9129b79248
if TSC jumps backwards (in case of migration to a different CPU core) latency peak may occur -- fixed
2010-09-26 13:30:33 +02:00
Martin Sustrik
e478468e52
minor error in comment fixed
2010-09-21 09:10:17 +02:00
Martin Sustrik
9c11886600
The flag in the socket has clear semantics now -- it tracks whether corresponding context was closed, it doesn't track whether zmq_close was called on the socket itself
2010-09-21 09:00:46 +02:00
Martin Sustrik
4d51a52874
zmq_poll (select version) now correctly assumes that ZMQ_FD is edge-trigerred
2010-09-20 17:25:04 +02:00
Martin Lucina
f49b77eedc
zmq_poll honours ZMQ_FORCE_POLL and ZMQ_FORCE_SELECT options
2010-09-20 16:55:46 +02:00
Martin Lucina
1abfc92d26
minor problem in zmq_poll (select version) fixed
2010-09-20 16:45:25 +02:00
Martin Sustrik
328c92a0a7
problem with engine being attached to session while it's being terminated fixed
2010-09-20 00:06:05 +02:00
Martin Sustrik
1d2399720b
zmq_init_t destroyed zmq_engine_t before plugging it out from the poller first -- fixed
2010-09-19 22:45:48 +02:00
Martin Sustrik
cda3c96a7f
minor code reorganisation in ctx_t::terminate
2010-09-19 22:17:37 +02:00
Martin Sustrik
938689a491
synchronisation problem fixed in ctx_t
2010-09-19 21:40:26 +02:00
Martin Sustrik
471013a59f
two races fixed in session creation
2010-09-19 20:43:14 +02:00
Martin Sustrik
1f10208ad0
termination of pipe via delimiter message could stuck when no data were read from the pipe (because connection wasn't active) -- fixed
2010-09-19 08:42:19 +02:00
Martin Sustrik
5153b6368b
obsolete 'active' flag removed from session_t
2010-09-19 08:39:53 +02:00
Martin Sustrik
4c6d07d366
single term ack counting mechanism for every socket (no separate mechanisms for fq_t and lb_t)
2010-09-18 07:37:36 +02:00
Martin Sustrik
fb6ce536d9
more details on launch_sibling in comments
2010-09-18 06:48:45 +02:00
Martin Sustrik
0c215fada4
potential duplicate termination of pipes removed
2010-09-18 06:42:46 +02:00
Martin Sustrik
c7b9ba3ccd
reconnection process fixed when failure occurs during init phase
2010-09-17 12:58:20 +02:00
Martin Sustrik
85aa25e56c
bug in REQ+multipart fixed
2010-09-17 12:32:46 +02:00
Martin Sustrik
ff1080728f
Merge branch 'maint'
...
* maint:
values of RATE, RECOVERY_IVL and SWAP options are checked for negative values
2010-09-15 16:58:00 +02:00
Martin Sustrik
e2802d9a4b
values of RATE, RECOVERY_IVL and SWAP options are checked for negative values
2010-09-15 16:44:57 +02:00
Martin Lucina
be159b6316
zmq::writer_t: Add missing test for swap
2010-09-13 13:27:48 +02:00
Martin Sustrik
92f9136ca6
lefover assert removed
2010-09-10 13:11:08 +02:00
Martin Sustrik
a68e6739f4
when no I/O threads are available error is raised instead of assertion
2010-09-09 08:25:00 +02:00
Martin Sustrik
91ea204644
EINTR returned from the blocking functions
2010-09-08 08:39:27 +02:00
Martin Sustrik
f374431ebe
get rid of 'has virtual functions but non-virtual destructor' warnings in pipe.hpp
2010-09-07 17:06:33 +02:00
Martin Sustrik
6d4ffd90db
Bug in fq_t and lb_t (when used via ZMQ_EVENTS option) fixed
2010-09-07 15:49:54 +02:00
Dhammika Pathirana
10227899b1
assert on malformed messages
2010-09-04 16:59:25 +02:00
Jon Dyte
c2f3b3b445
forwarder and streamer devices handle multi-part messages correctly
2010-09-04 16:58:59 +02:00
Ivo Danihelka
ae567be0c2
improved null checking in zmq_term
2010-09-04 16:58:29 +02:00
Martin Lucina
ca176121de
Merge branch 'maint'
...
* maint:
zmq::select_t, zmq_poll(): assert if FD_SETSIZE reached
zmq.h: Fix typo and use of C99 comment
Conflicts:
src/zmq.cpp
2010-09-04 16:24:21 +02:00
Martin Lucina
51a84c15de
zmq::select_t, zmq_poll(): assert if FD_SETSIZE reached
...
Ensure that 0MQ does not attempt to call select() on more than FD_SETSIZE
file descriptors.
2010-09-04 16:12:33 +02:00
Martin Sustrik
0a1f7e3524
Merge branch 'maint'
...
* maint:
Prior to this patch prefix_tree asserts.
Fix for signaler_t on HP-UX and AIX platforms
Mikael Kjaer added to AUTHORS
Conflicts:
src/trie.cpp
2010-09-02 08:07:40 +02:00
Jon Dyte
14853c2db5
Prior to this patch prefix_tree asserts.
...
This is because as it adds the 255th element at a node it attempts to calculate
the count member var which is an unsigned char via count = (255 -0) + 1; and
pass the result to realloc. Unfortunately the result is zero and realloc returns
null; the prefix_tree asserts. I have fixed it by making the count an unsigned
short.
2010-09-02 07:52:02 +02:00
Bernd Melchers
8ec0743c75
Fix for signaler_t on HP-UX and AIX platforms
2010-09-02 07:33:57 +02:00
Martin Sustrik
a81a37399b
Merge branch 'maint'
...
* maint:
Erasure of retired fd's in select.cpp causes an assertion in MSVC 2008 STL
2010-09-01 18:42:15 +02:00
Mikael Helbo Kjær
59315ebdcb
Erasure of retired fd's in select.cpp causes an assertion in MSVC 2008 STL
...
I was hitting an issue with an SCL enabled STL library in connection with the
way select_t::loop was erasing retired fd's. The problem as identified by the
SCL assertion was that by the time the iterator given to the erase method was
called it was considered invalid by the library. I am not sure this isn't just
a "quirk" of the MSVC STL library as the other code looks valid to me as well.
2010-09-01 18:39:12 +02:00
Martin Sustrik
0fe7d3c998
conflicts resolved
2010-09-01 15:29:19 +02:00
Martin Sustrik
651c1adc80
sys transport introdced; inproc://log moved to sys://log
2010-09-01 15:24:46 +02:00
Martin Sustrik
6a0c323bb2
MSVC build fixed
2010-09-01 13:31:45 +02:00
Martin Sustrik
ce0972dca3
context creates an inproc endpoint ('inproc://log') to distribute 0MQ's log messages
2010-09-01 07:57:38 +02:00
Martin Sustrik
db73c76314
assert when pipe attaches to PUB socket in process of termination -- fixed
2010-09-01 07:56:04 +02:00
Martin Sustrik
aaa07613d3
pipe being attached to the PAIR socket during its termination process is immediately asked to terminate itself
2010-09-01 07:54:57 +02:00
Martin Sustrik
47c064f2ea
hangup when closing socket with no pipes attached -- fixed
2010-09-01 07:35:15 +02:00
Martin Sustrik
090e460d6f
naming cleanup: yarray->array
2010-08-31 21:03:34 +02:00
Martin Sustrik
f5acbb5095
naming cleanup: zmq_encoder->encoder, zmq_decoder->decoder
2010-08-31 07:01:40 +02:00
Martin Sustrik
e45583c0f2
OSX build fixed -- semaphore replaced by mutex
2010-08-30 17:04:51 +02:00
Martin Sustrik
fba90af8a7
Issue 54 - socket_base.cpp:162 comparison error
2010-08-30 12:10:40 +02:00
Martin Sustrik
6ec783e702
prefix_tree_t renamed to trie_t
2010-08-28 13:26:19 +02:00
Martin Sustrik
beea535f9d
swap's block size made into a compile-time parameter
2010-08-28 13:18:53 +02:00
Martin Sustrik
d8b975f4e7
msg_store_t renamed to swap_t
2010-08-28 13:14:45 +02:00
Martin Sustrik
d90b407115
refactoring of pipe/swap interaction
2010-08-28 13:06:58 +02:00
Martin Sustrik
42000d2c4f
terminology unified: revive->activate
2010-08-28 10:15:03 +02:00
Martin Sustrik
92923cd40b
bug in pipe deactivation fixed
2010-08-28 08:44:12 +02:00
Martin Sustrik
035c937ee7
zmq_poll: account for the fact that ZMQ_FD is edge-triggered
2010-08-28 07:02:22 +02:00
Dhammika Pathirana
98dc11843e
assert on malformed messages
2010-08-27 18:06:37 +02:00
Martin Sustrik
56faac7f19
zmq_poll returns prematurely even if infinite timeout is set - fixed
2010-08-27 15:01:38 +02:00
Jon Dyte
3cb84b5cea
forwarder and streamer devices handle multi-part messages correctly
2010-08-27 06:59:55 +02:00
Ivo Danihelka
43f2c6ff5b
improved null checking in zmq_term
2010-08-26 12:14:53 +02:00
Martin Sustrik
b608c19c5a
MSVC build fixed
2010-08-25 15:39:21 +02:00
Martin Sustrik
9b8993efb4
elementary fixes to the named session
2010-08-25 15:39:21 +02:00
Martin Sustrik
46d7055565
connecter object unregisters its fd correctly
2010-08-25 15:39:21 +02:00
Martin Sustrik
87655b0b9d
listener object unregisters its fd correctly
2010-08-25 15:39:21 +02:00
Martin Sustrik
0d5f3ebbda
sessions created by listerner are correctly shut down
2010-08-25 15:39:21 +02:00
Martin Sustrik
5a731e73c8
added ZMQ_MAKE_VALGRIND_HAPPY compile-time option
2010-08-25 15:39:20 +02:00
Martin Sustrik
43e34d0281
engine leak fixed; pgm compilation fixed
2010-08-25 15:39:20 +02:00