Commit Graph

627 Commits

Author SHA1 Message Date
f18m
2622e618f0 Replace old website contribution page link with the page of the new website 2023-11-22 22:35:29 +00:00
Francesco Montorsi
481d536713
Documentation: improve the look of landing page (#4625)
* Documentation: improve the look of landing page by showing a more-compact list
2023-11-10 11:42:46 +00:00
Francesco Montorsi
3e08ecc012
Feature: improve docs (#4620)
* Feature: improve see-also doc section
2023-11-03 10:36:47 +00:00
Francesco Montorsi
267e856494
Feature: master: integrate with ReadTheDocs (#4614)
* Feature: integrate libzmq with ReadTheDocs

* add readthedocs configuration file to convert Asciidoc files into HTML and HTMLZIP formats using Asciidoctor.js tool (the only Asciidoctor variant available on readthedocs so far)
2023-11-02 20:44:34 +00:00
Francesco Montorsi
aa9a2c8429
docs: add index page (#4615) 2023-11-01 09:49:25 +00:00
Francesco Montorsi
b6ca9b2983 Feature: modernize API documentation
* migrate from the old, unmaintained "asciidoc-py" tool to the new "asciidoctor" generator
* migrate from asciidoc-py syntax to the modern Asciidoc syntax (especially page titles and section titles)
* remove the need of "xmlto" utility to create the manpage output; use asciidoctor for that
* add HTML output support to the doc/Makefile by using asciidoctor
* change API documentation files extension from .txt to .adoc to make it more explicit that they are Asciidoc-encoded (as a bonus several IDE plugins will autodetect the .adoc format as Asciidoc)
* remove asciidoc.conf: asciidoctor does not support that; this also required replacing the macro linkzmq into all documentation pages
* add a new Github action CI do deploy to Github Pages the static HTMLs produced by Asciidoctors
* removed references to the "xmlto" and "a2x" tools from the build and packaging systems: Asciidoctor can convert the documentation directly to e.g. pdf (via extended converters) and anyway there was no code/target for using "xmlto" and "a2x" tools anyway
2023-10-25 23:59:38 +02:00
George Cockshull
058ad60b9a zmq_proxy_steerable: support non-REP socket types
Problem: reimplemented zmq_proxy_steerable control socket type is not
backwards compatible - replies are always sent.

In the past, zmq_proxy_steerable never sent a reply for
commands that weren't STATISTICS, so only really worked with PAIR and didn't
work at all with REP. Now it only supports REP and PAIR semantics changed. This
breaks compatibility with PAIR in a subtle and slightly annoying way if
HWMs are hit without reading the replies.

Solution: Add a check to send the empty reply only for
REP control sockets. This restores backwards compatibility, and supports
REP, PAIR, and SUB (for non-reply commands).

I had no knowledge of the pre-MPL-2.0 implementation. This fix is based
on docs and prior API usage. I contribute this under MPL-2.0.
2023-10-12 15:22:44 -04:00
Brett Viren
5712ad5138 A clean-room implementation of zmq_proxy_steerable().
It is contriubted under the MPL-2.0.

I had no knowledge of the previous implementation of zmq_proxy_steerable().

This version was developed based on expectations set in the old man page with one exception.  This version uses a REP/REQ for the proxy control protocol sockets.  The old man page example used PUB/SUB which is nonsensical given the STATISTICS command requires two way communication.
2023-10-08 19:56:03 -04:00
Guillaume DELACOURT
797c7f09f8 When setting thread priority, always set the value to zero when the policy is not compatible. Also, only call nice when the priority is set to a strictly positive value. 2023-06-12 00:11:21 +01:00
Luca Boccassi
5bf04ee2ff Problem: docs for ZMQ_RECONNECT_IVL_MAX are stubs
Solution: write them now that the option is back
2023-06-06 18:09:12 +01:00
Luca Boccassi
da31917f4f Relicense from LGPL3 + exceptions to Mozilla Public License version 2.0
Relicense permission collected from all relevant authors as tallied at:
https://github.com/rlenferink/libzmq-relicense/blob/master/checklist.md
The relicense grants are collected under RELICENSE/ and will be moved
to the above repository in a later commit.

Fixes https://github.com/zeromq/libzmq/issues/2376
2023-06-05 20:31:47 +01:00
Luca Boccassi
7bbd49726b Problem: no permission to relicense ZMQ_RECONNECT_IVL_MAX
Solution: remove the implementation. Thijs Terlouw <thijsterlouw@gmail.com>,
the author, did not respond to requests to allow relicensing to MPL2,
so we have to remove his copyrighted work.
Remove the implementation and make get/set return -EOPNOTSUPP.
2023-06-05 00:22:20 +01:00
Luca Boccassi
13bc1de421 Problem: no permission to relicense zmq_proxy_steerable
Solution: remove implementation. Laurent Alebarde <l.alebarde@free.fr>,
the author, did not respond to requests to allow relicensing to MPL2,
so we have to remove his copyrighted work.
Make the API into an empty stub that returns -EOPNOTSUPP.
2023-06-04 23:54:31 +01:00
Jeff Weston
2d30020691
Add NORM Transport configuration sockopts (#4541)
* added NORM transport configuration socket options, and enabled NORM use of existing sockopts ZMQ_RATE for NORM fixed-rate operation, and ZMQ_TOS
2023-04-20 18:55:40 +01:00
Francesco Montorsi
c59104a01d
Add ZMQ_TOPICS_COUNT socket option (#4459) 2022-11-29 12:00:11 +00:00
Francesco Montorsi
7fad9599ab
Fix typo in zmq_socket_monitor_versioned docs (#4458)
* Fix typo in zmq_socket_monitor_versioned docs
2022-11-15 22:18:11 +00:00
Nevin Valsaraj
ea1962b825
Problem: Incorrect formatting of documentation in zmq_udp.txt
Solution: Replace incorrect underline pattern in zmq_udp.txt that
makes part of the text show up as pre-formatted code block with
regular underline pattern.
2022-07-22 09:19:13 -07:00
FeRD (Frank Dana)
159bf0f3ad Problem: Docs reference outdated spec
Solution: Update with URL to current stable spec
2022-03-03 02:20:39 -05:00
Dimitris Apostolou
6b8dd84a63
Fix typos 2022-02-11 00:45:06 +02:00
Luca Boccassi
176d72cc9b Problem: build fails with gcc 12
Solution: change test_monitor and example
2022-01-18 16:15:07 +00:00
Paul Thiele
6737d50933 Problem: if ZMQ_XPUB_VERBOSER is used with proxies unsubscribe messages are lost
Solution: add socket option ZMQ_XSUB_VERBOSE_UNSUBSCRIBE to forward all unsubscribe messages
2021-11-05 15:12:31 +01:00
Gudmundur Adalsteinsson
7c2df78b49 Problem: Invalid and inconsistent poller docs
Solution: Fix it and make example code more complete
2021-10-10 11:55:56 +01:00
E. G. Patrick Bos
36e4c9b474
add zmq_ppoll
zmq_ppoll mostly mimics zmq_poll behavior, except for the added feature of being able to specify a signal mask. Signals in this mask will be blocked during execution of zmq_ppoll. Switching of the process' active signal mask happens atomically with the actual poll call, so that no race conditions can occur. This behavior is useful when one wants to gracefully handle POSIX signals without race conditions. See e.g. the discussion below https://250bpm.com/blog:12/ for an explanation.

Also includes two new tests:
1. test_zmq_ppoll_fd does the same thing as test_zmq_poll_fd, demonstrating backwards compatibility with zmq_poll when used with a default signal mask.
2. test_zmq_ppoll_signals demonstrates the use of zmq_ppoll with a signal mask, blocking out SIGTERM everywhere except in zmq_ppoll, allowing to handle the signal in one place without having to worry about race conditions.
2021-09-24 11:04:20 +02:00
Doron Somech
1c6c5514ed problem: no way to know when connection is temporarly dropped
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
2021-06-06 17:14:22 +03:00
Tarn W. Burton
d6e7ea44f7 Update fd slot type to zmq_fd_t 2021-05-16 08:50:06 -04:00
Chengye Ke
04c37982b1
Support so_busy_poll (#4188)
* Support so_busy_poll.
2021-05-14 23:05:56 +01:00
Luca Boccassi
e58f047791 Problem: typos in zmq_setsockopt.txt
Solution: fix them
2021-01-16 15:41:58 +00:00
Andy Heroff
2998ff34aa
Problem: No direct support for setting socket priority (#4118)
* 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.
2021-01-06 22:22:41 +00:00
Luca Boccassi
6f46375440
Merge pull request #4080 from ardrabczyk/docs-fixes
Fix a typo and wrong order of assert() in the examples
2020-11-10 09:38:33 +00:00
Arkadiusz Drabczyk
ce7c1cec87 Problem: assert() was used on undefined variables in the examples
Solution: use assert() on defined variables

Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
2020-11-09 22:52:12 +01:00
Arkadiusz Drabczyk
d3f59e68ea Problem: there is a typo: 'threda names'
Solution: fix a typo: threda names -> thread names

Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
2020-11-09 22:36:17 +01:00
Arkadiusz Drabczyk
d43ae07456 Problem: not all possible errno values were documented (#4078)
Solution: document more possible errno values

Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
2020-11-09 22:23:43 +01:00
C-sir
d4f03edd47
stop reconnect after called zmq_disconnect() (#4053) 2020-09-28 09:59:57 +01:00
serg06
f03b67a50b
Fix zmq_poller.txt
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.
2020-06-27 17:58:16 -04:00
Bill Torpey
c04f6581e0
rebase reconnect-redux on master (#3960)
* add option to stop reconnecting on failed handshake
2020-06-26 23:41:44 +01:00
Luca Boccassi
7f83eeb1b7 Problem: thread safety documentation is misleading
Solution: change it to categorically state that non-thread-safe
sockets are not thread safe, ever
2020-06-09 10:25:18 +01:00
Luca Boccassi
4341f14f41 Problem: documentation uses unfriendly language
Solution: use more descriptive, accurate and welcoming terms like allowing
and blocking
2020-06-08 19:32:45 +01:00
Doron Somech
3da84c6d06 problem: no thread-safe alternative for ZMQ_PAIR
Solution: create ZMQ_CHANNEL, the thread safe alternative
2020-05-09 08:49:01 +03:00
Gudmundur Adalsteinsson
bf22a9f3e9 Problem: Poller event fd unspecified
Solution: Specify an invalid file descriptor for socket events
2020-04-27 21:00:45 +00:00
Luca Boccassi
ada6f0c058
Merge pull request #3871 from somdoron/DISCONNECT_MSG
problem: router doesn't know when peer disconnected
2020-04-18 10:49:50 +01:00
Gudmundur Adalsteinsson
9c6738bb45 Problem: No support to query poller size
Solution: Add zmq_poller_size that queries the number
of objects registered, allowing safer usages of poller
to avoid livelock situations.
2020-04-17 18:37:01 +00:00
Doron Somech
81444136d5 problem: router doesn't know when peer disconnected
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.
2020-04-17 18:04:28 +03:00
Doron Somech
93da6763b0 problem: ZMQ_HEARTBEAT is not useful without sending an hello message
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.
2020-04-17 14:54:58 +03:00
Gudmundur Adalsteinsson
458d805eb6 Problem: poller sleeps forever if no events
Solution: Fail with error if no events are active and timeout is infinite
2020-04-13 21:18:12 +00:00
Gudmundur Adalsteinsson
7b1fef28f9
Problem: boilerplate when init msg from data copy (#3860)
* Problem: boilerplate when init msg from data copy

Solution: Add zmq_msg_init_buffer to construct
a message by copying memory from buffer.
2020-04-09 23:59:43 +01:00
Luca Boccassi
347ff07c94
Merge pull request #3862 from gummif/gfa/poller-formatting
Problem: Strange zmq_poller doc formatting
2020-04-09 16:23:02 +01:00
Gudmundur Adalsteinsson
fa2af05d47 Problem: Strange zmq_poller doc formatting
Solution: Add newlines and extra asterisks
2020-04-09 14:18:34 +00:00
Gudmundur Adalsteinsson
cbdf075658 Problem: zmq_send doc does not match declaration
Solution: add const to pointer type
2020-04-09 13:55:42 +00:00
Luca Boccassi
3c13e9222d
Merge pull request #3851 from gummif/gfa/ts-int
Problem: ZMQ_THREAD_SAFE is not bool
2020-03-23 21:11:29 +00:00
Gudmundur Adalsteinsson
e1fc84141d
Problem: ZMQ_THREAD_SAFE is not bool
Solution: Change documentation value type to int
2020-03-23 20:49:39 +00:00