This is important in order to send the login sequence of a client to the server.
Solution: add ZMQ_HICCUP_MSG to a socket, socket would send that message whenever a connection get temporarly disconnected
* Problem: No direct support for setting socket priority
Solution: Add ZMQ_PRIORITY socket option, which sets the
SO_PRIORITY socket option on the underlying socket. This
socket option is not supported under Windows. Check option
and set socket option on creation of underlying socket.
Fixed three things:
1. Moved asterisks by variable names into the single quotes (to match [zmq_poll](https://github.com/zeromq/libzmq/edit/master/doc/zmq_init.txt) and other pages.)
2. Fixed variable name in example.
3. Fixed extra & in example.
ZMQ_ROUTER_NOTIFY doesn't have a context and doesn't play nice with protocols. with ZMQ_DISCONNECT_MSG we can set it to a protocol message, like DISCONNECT in majordomo. Router will send it when a peer is disconnected. Another advantage of ZMQ_DISCONNECT_MSG is that it also works on inproc.
Together with ZMQ_HEARTBEAT it allows to build very reliable protocols, and much simpler as well.
When using ZMQ_HEARTBEAT one still needs to implement application-level heartbeat in order to know when to send a hello message.
For example, with the majordomo protocol, the worker needs to send a READY message when connecting to a broker. If the connection to the broker drops, and the heartbeat recognizes it the worker won't know about it and won't send the READY msg.
To solve that, the majordomo worker still has to implement heartbeat. With this new option, whenever the connection drops and reconnects the hello message will be sent, greatly simplify the majordomo protocol, as now READY and HEARTBEAT can be handled by zeromq.
* UDP is mentioned as available transport, and it also supports
wildcard addresses, but not mentioned
* zmq_unbind(7) also mentions about wild-card endpoint in zmq_bind(3)
Solution: add udp in wildcard address related docs
Solution: a new socket type, called PEER. Very similar to SERVER, but can only connect to other PEERs. Also a new zmq_connect_peer method, that connect and return a routing-id in thread-safe and atomic operation
Solution: fix handling of _starting and _terminate flags
Add tests for this situation.
Clarify documentation of zmq_ctx_shutdown and zmq_socket.
Fixes#3792
Solution: now if the first frame in a multipart message is not subscribe/unsubscribe,
the rest of the parts are also considered to be not subscribe/unsubscribe.
Solution: Reflect real behavior of sockets blocking on send operations
Sockets that block in mute state only block when no peer is available if
the transport is connection-oriented and the ZMQ_IMMEDIATE socket option
is set.
Solution: restore separate zmq_unbind documentation, adding a note that the implementation
might be shared but the semantics are different and should not be mixed.
This avoids tying the API to the implementation details which might change for some
engines.
Solution: clearly advise users to avoid them in all cases to
avoid unforseen problems.
Also fix markdown syntax, applicable transport types and getter description.