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
Martin Sustrik
45f83d78a5
one more dezombification bug fixed
2010-08-25 15:39:20 +02:00
Martin Sustrik
936dbf956b
dezombification procedure fixed
2010-08-25 15:39:20 +02:00
Martin Sustrik
76bd6e73c3
engine termination on disconnect fixed
2010-08-25 15:39:20 +02:00
Martin Sustrik
d13933bc62
I/O object hierarchy implemented
2010-08-25 15:39:20 +02:00
Martin Lucina
ee1f1af009
zmq_poll(): Fix some corner cases
...
Trying to optimize out the case where items_[i]. events is 0 would
result in a bogus pollfds[i]. Similarly in the select()-based impl,
while not strictly necessary it's better to get ZMQ_FD even if
events is 0 since that detects ETERM and friends.
2010-08-25 15:39:20 +02:00
Martin Lucina
a85d1e51bf
zmq_poll(): Rewrite to use ZMQ_FD/ZMQ_EVENTS pt2
...
Rewrite the select()-based zmq_poll() implementation to use
ZMQ_FD and ZMQ_EVENTS.
Also fix some corner cases: We should not pollute revents with
unrequested events, and we don't need to poll on ZMQ_FD at all
if a pollitem with no events set was passed in.
2010-08-25 15:39:20 +02:00
Martin Lucina
6b1ca2cb1e
Fix whitespace
...
Dunno where those <TAB>s came from...
2010-08-25 15:39:20 +02:00
Martin Lucina
cd12508418
zmq_poll(): Rewrite to use ZMQ_FD/ZMQ_EVENTS pt1
...
Rewrite zmq_poll() to use ZMQ_FD and ZMQ_EVENTS introduced on the
wip-shutdown branch. Only do the poll()-based version of zmq_poll (), the
select()-based version will not compile at the moment.
2010-08-25 15:39:20 +02:00
Martin Sustrik
eb7b8a413a
REP socket layered on top of XREP socket
2010-08-25 15:39:20 +02:00
Martin Sustrik
3e97c0fef4
REQ socket implementation is layered on top of XREQ
2010-08-25 15:39:20 +02:00
Martin Sustrik
f77edfce26
Destruction of session is delayed till both in & out pipes are closed
2010-08-25 15:39:20 +02:00
Martin Sustrik
05d908492d
WIP: Socket migration between threads, new zmq_close() semantics
...
Sockets may now be migrated between OS threads; sockets may not be used by
more than one thread at any time. To migrate a socket to another thread the
caller must ensure that a full memory barrier is called before using the
socket from the target thread.
The new zmq_close() semantics implement the behaviour discussed at:
http://lists.zeromq.org/pipermail/zeromq-dev/2010-July/004244.html
Specifically, zmq_close() is now deterministic and while it still returns
immediately, it does not discard any data that may still be queued for
sending. Further, zmq_term() will now block until all outstanding data has
been sent.
TODO: Many bugs have been introduced, needs testing. Further, SO_LINGER or
an equivalent mechanism (possibly a configurable timeout to zmq_term())
needs to be implemented.
2010-08-25 15:39:20 +02:00
Martin Lucina
b66dd7afd2
zmq_stopwatch_stop: Don't return EFAULT
...
Function returning unsigned long int cannot return (-1)
2010-08-25 09:50:45 +02:00
Pieter Hintjens
5be54b9120
46 - Devices vulnerable to invalid messages
...
http://github.com/zeromq/zeromq2/issues#issue/46
Invalid messages are now discarded silently, instead of causing an assertion
failure.
2010-08-11 17:05:19 +02:00
Pieter Hintjens
b6cdd369e3
Added error checking (EFAULT) for null arguments
...
* Fixed zmq_term, zmq_socket, zmq_close, zmq_setsockopt,
* zmq_getsockopt, zmq_bind, zmq_connect, zmq_send,
* zmq_recv, zmq_poll, zmq_device, zmq_stopwatch_stop
* Updated Reference Manual for these methods
2010-08-08 11:43:32 +02:00
Pieter Hintjens
677b3d906a
Added not-null assertions on pointer arguments in C API functions
...
* zmq_term
* zmq_socket
* zmq_close
* zmq_setsockopt
* zmq_getsockopt
* zmq_bind
* zmq_connect
* zmq_send
* zmq_recv
* zmq_poll
* zmq_device
* zmq_stopwatch_stop
2010-08-07 20:55:07 +02:00
Martin Lucina
6d35e82db4
Fix uninitialized use of nbytes in signaler fix
2010-08-06 12:00:57 +02:00
Martin Lucina
9ac2ff449c
zmq::signaler_t: Restart syscalls on EINTR
...
This patch restarts the send() or recv() inside zmq::signaler_t if the call fails
due to EINTR.
2010-08-05 23:40:30 +02:00
Pieter Hintjens
11a410b658
Renamed ZMQ_UPSTREAM to ZMQ_PULL, and ZMQ_DOWNSTREAM to ZMQ_PUSH. Left the old
...
definitions as aliases, to be removed in release 3.0. Also renamed the source
files implementing these two socket types. This change does not break existing
applications nor bindings, but allows us to fix the documentation and user guide
now, rather than keeping the old (confusing) names.
2010-08-04 14:38:56 +02:00
Martin Lucina
544b36da68
XREQ: Correct behaviour on hitting ZMQ_HWM
...
This reverts part of commit 84e0c7991a9b316ed571533abc628cc1175750a3 to get
correct ZMQ_HWM semantics with XREQ sockets:
When sending a message to an XREQ socket, the underlying pipe is selected in
a round-robin fashion. If an underlying pipe is full it is skipped. If there
are no underlying pipes, or all underlying pipes are full then zmq_send()
shall block or return EAGAIN, depending on whether or not the call is blocking.
Messages are never dropped.
2010-07-30 16:49:06 +02:00
Martin Hurton
10533a560b
pipe: check_read() should check for message delimiter
2010-07-24 17:33:54 +02:00
Martin Hurton
e1c596b37e
Make sure lwm > 0 when hwm > 0
2010-07-24 17:19:47 +02:00
Martin Lucina
5b1a6a4bea
Issue 42 - getaddrinfo() fails
2010-07-21 17:33:40 +02:00
Martin Sustrik
aedf3f808b
EHOSTUNREACH is a valid return value from recv()
2010-07-19 08:38:24 +02:00
Martin Sustrik
269904361b
minor comment clarification
2010-07-13 11:46:56 +02:00
Martin Sustrik
da49e5a4dd
devices exit in case of context termination
2010-07-13 07:57:29 +02:00
Martin Hurton
ca057c7db8
Fix identity generation for transient inproc connections
2010-07-10 23:02:50 +02:00
Martin Hurton
1f61c87ac5
issue 40 - nbytes != -1 (tcp_socket.cpp:216)
2010-07-07 17:15:32 +02:00
Martin Hurton
fd707fedc5
issue 38 - Assertion failed: fetched (xrep.cpp:196)
2010-07-07 12:41:53 +02:00
Pieter Hintjens
0ab6532419
Prevent socket reuse by second bind, on win32
2010-06-29 21:08:41 +02:00
Martin Sustrik
79a3d07c85
MSVC build fixed
2010-06-29 07:45:11 +02:00
Martin Sustrik
ba91644fdb
msg_store added to MSVC build
2010-06-26 20:11:40 +02:00
Pieter Hintjens
1dda8a2aaa
Used more expressive variable names
2010-06-25 18:35:42 +02:00
Martin Hurton
fca2e8e8cc
Add SWAP support
2010-06-21 15:06:51 +02:00
Martin Hurton
10c28c1fc2
Revive reader on pipe termination
2010-06-19 20:51:42 +02:00
Martin Hurton
2c3913bb19
fix double free error in PAIR socket
2010-06-19 19:50:55 +02:00
Martin Sustrik
cff7ba2315
Windows build fixed
2010-06-17 17:09:51 +02:00
Martin Sustrik
7f01e9970d
stopwatch returned to libzmq
2010-06-17 16:51:53 +02:00
Martin Hurton
4777fe4010
pipe: fix bug in rollback() method
...
The msgs_written variable keeps track how many complete
messages have been written so far. The rollback operation drops all
fragments of the last incomplete message so it shouldn't
change this variable at all.
2010-06-17 13:00:30 +02:00
Martin Sustrik
9151de3895
generate identity for transient inproc connections
2010-06-17 11:01:18 +02:00
Brian Buchanan
ac90b7e0ba
issue 35 - ZMQ_RCVMORE sometimes erroneously returns false
2010-06-11 08:03:34 +02:00
Martin Sustrik
5ee355d188
if connect asserts, exact error is reported
2010-06-11 07:02:36 +02:00
Martin Sustrik
27877d73ea
EHOSTUNREACH is acceptable outcome from connect
2010-06-11 06:55:30 +02:00
Piotr Trojanek
c818b14bbd
clearing thread info structure
2010-06-10 12:57:42 +02:00
Martin Sustrik
74a3907be2
couple of ICC warnings fixed
2010-06-10 12:36:27 +02:00
Martin Sustrik
76e0153d4f
issue 33 - missing virtual destructors
2010-06-10 07:21:05 +02:00
Martin Sustrik
d329c55da9
issue 31 - Assertion failed: err == ECONNREFUSED || err == ETIMEDOUT (tcp_connecter.cpp:296)
2010-06-10 07:12:00 +02:00
Martin Sustrik
604f7475ec
issue 32 - poll_t poller broken
2010-06-09 17:49:08 +02:00
Piotr Trojanek
751b60a18d
extra ';' inside a struct or union -- clang warnings fixed
2010-06-09 17:06:32 +02:00
Martin Sustrik
240fc33f65
minor comment clarification
2010-06-07 20:23:48 +02:00