- 03 Jun, 2012 2 commits
-
-
Ian Barber authored
-
Ian Barber authored
-
- 01 Jun, 2012 2 commits
-
-
Douglas Young authored
Fix Win32 build.
-
Ian Barber authored
After speaking with Ben Gray and the discussion on the mailing list, this is an attempt to create a sockopt to allow connecting pipes to not immediately be available for traffic. The problem is in a PUSH to many PULL situation, where there is a connect to a PULL which is not there. This connect will immediately create a pipe (unlike bind), and traffic will be load balanced to that pipe. This means if there is a persistently unavailable end point then the traffic will queue until HWM is hit, and older messages will be lost. This patch adds a sockopt ZMQ_DELAY_ATTACH_ON_CONNECT, which if set to 1 will attempt to preempt this behavior. It does this by extending the use of the session_base to include in the outbound as well as the inbound pipe, and only associates the pipe with the socket once it receives the connected callback via a process_attach message. This works, and a test has been added to show so, but may introduce unexpected complications. The shutdown logic in this class has become marginally more awkward because of this, requiring the session to serve as the sink for both pipes if shutdown occurs with a still-connecting pipe in place. It is also possible there could be issues around flushing the messages, but as I could not directly think how to create such an issue I have not written any code with regards to that. The documentation has been updated to reflect the change, but please do check over the code and test and review.
-
- 31 May, 2012 3 commits
-
-
Martin Hurton authored
-
Martin Hurton authored
When removing a pipe from the lb or fq component, make sure we do not remove another pipe from the active set.
-
Steven McCoy authored
Fix Win32 build.
-
- 29 May, 2012 1 commit
-
-
Martin Hurton authored
The patch extends the internal session's API with the reset method. This method is used to reset a session's state so that it can handle a new connection.
-
- 28 May, 2012 3 commits
-
-
Martin Hurton authored
-
Martin Hurton authored
-
Martin Hurton authored
The bug was that after reconnect, the session did not handle identity messages properly.
-
- 27 May, 2012 7 commits
-
-
Martin Hurton authored
-
Martin Hurton authored
-
Martin Hurton authored
-
Martin Hurton authored
-
Martin Hurton authored
-
Martin Hurton authored
-
Martin Hurton authored
-
- 22 May, 2012 1 commit
-
-
Lourens Naudé authored
-
- 21 May, 2012 2 commits
-
-
Lourens Naudé authored
-
Lourens Naudé authored
-
- 20 May, 2012 3 commits
-
-
Lourens Naudé authored
Rename type zmq_monitor_fn -> zmq_monitor for a more natural callback definition API (zmq_monitor type, monitor.function callback)
-
Lourens Naudé authored
Change zmq_monitor_fn type to cast between pointer-to-object and pointer-to-function in a more standards compliant way
-
Ivan Pechorin authored
-
- 13 May, 2012 1 commit
-
-
KennyTM~ authored
The current ZMQ_MONITOR code does not compile in gcc 4.7, as -pedantic and -Werror are enabled, and ISO C++ doesn't allow casting between normal pointers (void*) and function pointers, as pedantically their size could be different. This caused the library not compilable. This commit workaround the problem by introducing one more indirection, i.e. instead of calling (void *)listener which is an error, we have to use *(void **)&listener which is an undefined behavior :) but works on most platforms Also, `optval_ = monitor` will not set the parameter in getsockopt(), and the extra casting caused the LHS to be an rvalue which again makes the code not compilable. The proper way is to pass a pointer of function pointer and assign with indirection, i.e. `*optval_ = monitor`. Also, fixed an asciidoc error in zmq_getsockopt.txt because the `~~~~` is too long.
-
- 08 May, 2012 2 commits
-
-
Martin Hurton authored
-
Martin Hurton authored
This patch fixes a bug in the message encoder which was responsible for computing incorrect message offset. The bug affected PGM receiver making it unable to decode inital messages.
-
- 07 May, 2012 1 commit
-
-
unknown authored
-
- 04 May, 2012 1 commit
-
-
Lourens Naudé authored
-
- 03 May, 2012 1 commit
-
-
Ian Barber authored
Patch from Mato that fixes a subtle connect bug: EAGAIN was being used as a translation value for EINPROGRESS, thus shadowing a real EAGAIN return value from the OS. This caused later assertions of "Invalid argument" in stream_engine.cpp when it attempted to use a socket which was not connected. I also add EINTR to mean EINPROGRESS, as per the POSIX and FreeBSD documentation which specifies that a connect() call interrupted due to a signal will complete asynchronously. Signed-off-by:
Martin Lucina <martin@lucina.net>
-
- 29 Apr, 2012 3 commits
-
-
Martin Hurton authored
When more then one peer connected to a ZMQ_PAIR socket, an application aborted due to assertion failure. This patch changes the ZMQ_PAIR socket behaviour so that it rejects any further connection requests.
-
Martin Hurton authored
The decoder did not properly decode large messages on systems where sizeof (size_t) < sizeof (uint64_t).
-
Martin Hurton authored
Before this patch, the stream engine terminated itself whenever it had detected an IO error. If this happened when sending a message, the engine lost all in-flight messages, messages waiting to be decoded, and the last decoded message that had not been accepted, if there was one. The new behaviour is to terminate the engine only after the input error has been detected and the last decoded
-
- 28 Apr, 2012 1 commit
-
-
Martin Hurton authored
-
- 26 Apr, 2012 2 commits
-
-
Martin Hurton authored
The recv function accepted flags parameter but this was unused.
-
Martin Hurton authored
-
- 25 Apr, 2012 1 commit
-
-
Martin Hurton authored
+ fix whitespace errors + drop some unnecessary parens
-
- 24 Apr, 2012 2 commits
-
-
Martin Hurton authored
The implementation of the send call for XSUB socket failed to release and initialise empty message when duplicate subscription was detected.
-
Patrick Trantham authored
This commit implements atomic operations for the armv7a architecture using gcc inline assembly. This offers higher performance compared to pthread mutexes. Tested on an am3517 evm, clocked at 600MHz: ./inproc_thr 200 1000000 ------------------------ 53-60K messages / sec, pthread mutexes 73-90K messages / sec, assembly atomic ops ./inproc_lat 200 1000000 ------------------------ average latency: 42.234 [us], pthread mutexes average latency: 35.496 [us], assembly atomic ops
-
- 21 Apr, 2012 1 commit
-
-
Sergey KHripchenko authored
I believe there was a conception that zmq_connect() and zmq_bind() will be called only at the socket creation time and therefore don't need it. Now it is not true anymore.
-