Go to file
Sergey KHripchenko 057fab09a8 fixes for zmq_unbind() / zmq_disconnect() usage corner cases
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)
2012-04-21 18:56:10 +04:00
builds Fixed issue #348 2012-03-26 16:31:12 -05:00
doc Implement ZMQ_TCP_ACCEPT_FILTER setsockopt() for listening TCP sockets. 2012-04-12 18:37:14 +04:00
foreign/openpgm New upstream OpenPGM maintenance release 5.1.118. 2011-10-04 09:39:55 +02:00
include 2nd try wuth sock->unbind() and sock->disconnect(). now with blackjack and const char*'s 2012-04-20 18:59:08 +04:00
perf Revert NULL checks in the API 2012-02-17 09:48:04 +00:00
src fixes for zmq_unbind() / zmq_disconnect() usage corner cases 2012-04-21 18:56:10 +04:00
tests added zmq_unbind() / zmq_disconnect() test script. 2012-04-21 18:39:19 +04:00
.gitignore Simplified zmq_msg_get/set functions 2012-03-21 14:19:40 -05:00
.hgeol Line-ending conversion rules for hg-git users and enabled use of .gitignore by hg-git users 2011-11-19 10:02:23 +01:00
acinclude.m4 more flexible keepalive options detection + awful options documentation 2012-04-06 20:04:35 +04:00
AUTHORS Allowing value 0, and moving code to get_address functions based on feedback 2012-02-11 15:09:03 +00:00
autogen.sh Copyright dates adjusted to reflect reality 2011-11-01 18:06:11 +01:00
configure.in more flexible keepalive options detection + awful options documentation 2012-04-06 20:04:35 +04:00
COPYING missing COPYING file added 2010-02-16 17:50:36 +01:00
COPYING.LESSER Linking exception corrected 2011-11-04 08:05:39 +01:00
INSTALL added more specific installation documentation 2012-02-16 19:50:28 -05:00
MAINTAINERS Fixed email addresses in the MAITAINERS file 2011-07-18 14:29:20 +02:00
Makefile.am RPM packaging improvements 2011-04-09 08:45:12 +02:00
NEWS NEWS updated for 3.1.0 release 2011-12-18 11:41:45 +01:00
README Project location on github changed in README file 2011-04-02 19:32:44 +02:00
version.sh m4_esyscmd_s doesnt seem to be portable across different systems 2011-02-07 15:06:20 +01:00

Welcome
-------

The 0MQ lightweight messaging kernel is a library which extends the
standard socket interfaces with features traditionally provided by
specialised messaging middleware products. 0MQ sockets provide an
abstraction of asynchronous message queues, multiple messaging patterns,
message filtering (subscriptions), seamless access to multiple transport
protocols and more.


Building and installation
-------------------------

See the INSTALL file included with the distribution.


Resources
---------

Extensive documentation is provided with the distribution. Refer to
doc/zmq.html, or "man zmq" after you have installed 0MQ on your system.

Website: http://www.zeromq.org/

Development mailing list: zeromq-dev@lists.zeromq.org
Announcements mailing list: zeromq-announce@lists.zeromq.org

Git repository: http://github.com/zeromq/libzmq

0MQ developers can also be found on the IRC channel #zeromq, on the
Freenode network (irc.freenode.net).

Copying
-------

Free use of this software is granted under the terms of the GNU Lesser General
Public License (LGPL). For details see the files `COPYING` and `COPYING.LESSER`
included with the 0MQ distribution.