- 21 Apr, 2012 5 commits
-
-
Sergey KHripchenko authored
1. when we call zmq_bind()/zmq_connect() to create endpoint we send ourselfs(through launch_child()) command to process_own(endpoint) (and add it to own_t::owned) in the application thread we could call zmq_unbind() / zmq_disconnect() _BEFORE_ we run process_own() in ZMQ thread and in this situation we will be unable to find it in own_t::owned. in other words own_t::owned.find(endpoint) will not be deleted but it will be deleted from socket_base_t::endpoints. 2. when you zmq_unbind() the lisnening TCP/IPC socket was terminated only in destructor... so the whole ZMQ_LINGER time listening TCP/IPC socket was able to accept() new connections but unable to handle them. this all geting even worse since unfortunately zmq has a bug and '*_listener_t' object not terminated untill the socket's zmq_close(). AT LEAST FOR PUSH SOCKETS. Everything is ok for SUB sockets. Easy to reproduce without my fix: zmq_socket(PUSH) zmq_bind(tcp); // connect to it from PULL socket zmq_unbind(tcp); sleep(forever) // netstat -anp | grep 'tcp listening socket' With my fix you could see that after zmq_unbind(tcp) all previously connected tcp sessions will not be finished untill the zmq_close(socket) regardless of ZMQ_LINGER value. (*_listener_t terminates all owned session_base_t(connect=false) and they call pipe_t::terminate() which in turn should call session_base_t::terminated() but this never happens)
-
Sergey KHripchenko authored
it works but rises very serious questions. Please add license header by your choice. This file for 99% resemble crossroads-io/tests/shutdown.cpp
-
Sergey KHripchenko authored
-
Sergey KHripchenko authored
-
Sergey KHripchenko authored
-
- 20 Apr, 2012 2 commits
-
-
Sergey KHripchenko authored
make[2]: Entering directory `/home/laotse/src/abs/zeromq-git/src/libzmq-build/src' CXX libzmq_la-address.lo address.cpp: In destructor 'zmq::address_t::~address_t()': address.cpp:41:29: error: deleting object of polymorphic class type 'zmq::tcp_address_t' which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor] cc1plus: all warnings being treated as errors
-
Sergey KHripchenko authored
-
- 18 Apr, 2012 2 commits
-
-
Sergey KHripchenko authored
-
Sergey KHripchenko authored
fix bug in zmq::tcp_address_t::resolve_interface() where all resolved interface ip's overwrited by 0.0.0.0
-
- 13 Apr, 2012 1 commit
-
-
Sergey KHripchenko authored
-
- 12 Apr, 2012 1 commit
-
-
Sergey KHripchenko authored
Assign arbitrary number of filters that will be applied for each new TCP transport connection on a listening socket. If no filters applied, then TCP transport allows connections from any ip. If at least one filter is applied then new connection source ip should be matched. To clear all filters call zmq_setsockopt(socket, ZMQ_TCP_ACCEPT_FILTER, NULL, 0). Filter is a null-terminated string with ipv6 or ipv4 CIDR. For example: localhost 127.0.0.1 mail.ru/24 ::1 ::1/128 3ffe:1:: 3ffe:1::/56 Returns -1 if the filter couldn't be assigned(format error or ipv6 filter with ZMQ_IPV4ONLY set) P.S. The only thing that worries me is that I had to re-enable 'default assign by reference constructor/operator' for 'tcp_address_t' (and for my inherited class tcp_address_mask_t) to store it in std::vector in 'options_t'...
-
- 11 Apr, 2012 2 commits
-
-
Pieter Hintjens authored
Fix issue #335
-
Martin Hurton authored
The CreateEvent function requests EVENT_ALL_ACCESS access rights when the event object already exists. This causes problems when the event object is created from a service. The solution is to call OpenEvent function when the CreateEvent failed due to access control. The proper solution would be to use CreateEventEx function, but this one is not available on Windows XP.
-
- 10 Apr, 2012 4 commits
-
-
Pieter Hintjens authored
C++ style comments result in compile errors with non-c99 C compiler
-
jdc8 authored
-
Pieter Hintjens authored
Handle ETIMEDOUT
-
Mikko Koppanen authored
-
- 09 Apr, 2012 2 commits
-
-
Pieter Hintjens authored
Implement ZMQ_TCP_KEEPALIVE* family of options to adjust TCP keepalives
-
Sergey KHripchenko authored
-
- 06 Apr, 2012 1 commit
-
-
Sergey KHripchenko authored
-
- 05 Apr, 2012 3 commits
-
-
Sergey KHripchenko authored
currently not fully cross-platform work on linux possibly work in *bsd and could be enhanced to work on windows
-
Pieter Hintjens authored
Fix identity exchange for inproc transport
-
Martin Hurton authored
The socket connecting using the inproc transport never received the identity of the remote peer.
-
- 04 Apr, 2012 4 commits
-
-
Pieter Hintjens authored
Flush identity message for inproc transport
-
Martin Hurton authored
The scoket implementation for inproc transfer failed to flush identity message. The result was that the identity message was not delivered until after the user sent the first message. The identity message was never delivered if the user used the socket only to receive messages.
-
Ian Barber authored
Fixed issue #351
-
Pieter Hintjens authored
-
- 03 Apr, 2012 2 commits
-
-
Pieter Hintjens authored
Fix error in router socket introduced in the previous commit
-
Martin Hurton authored
-
- 02 Apr, 2012 4 commits
-
-
Ian Barber authored
router: always respect message boundaries
-
Ian Barber authored
router: reimplement peer identification
-
Martin Hurton authored
The current implementaion of router socket does not handle the full pipe and unroutable messages properly. Namely, in those cases, the socket could route some message parts into a wrong connection.
-
Martin Hurton authored
The new implementation allows one to send messages through a router socket to a peer even before receiving messages from this peer. Fixes issue #304
-
- 29 Mar, 2012 4 commits
-
-
Ian Barber authored
Added checking to zmq_ctx_set()
-
Pieter Hintjens authored
-
Ian Barber authored
Fixed issue (unknown) on zmq_init(-1)
-
Pieter Hintjens authored
-
- 28 Mar, 2012 3 commits
-
-
Ian Barber authored
Code cleanup
-
Ian Barber authored
Fix return value of send for router socket
-
Martin Hurton authored
-