0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-26 23:01:04 +08:00

604 Commits

Author SHA1 Message Date
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
JaeSang Yoo
ded0d83e47 Problem: wildcard address with udp not mentioned
* 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
2020-03-07 14:55:01 +09:00
JaeSang Yoo
296beecd24 Problem: UDP is not mentioned in bind and connect
zmq_bind(3) and zmq_connect(3) does not mention UDP as available
transport types.

Solution: add udp mentioning line for related docs
2020-03-07 14:35:06 +09:00
Bill Torpey
debbe08fb8
add option to stop trying to reconnect on ECONNREFUSED (#3831)
* add option to stop trying to reconnect on ECONNREFUSED
2020-02-23 17:17:22 +00:00
Doron Somech
70bc7dd925 problem: zeromq doesn't has a thread-safe peer to peer socket
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
2020-02-09 23:20:14 +02:00
Doron Somech
40de45396f problem: no docs for scatter-gather 2020-02-05 02:33:38 +02:00
Gudmundur Adalsteinsson
f80830c4a8 Problem: Documentation for option name mismatch
Solution: Fix typo
2020-02-04 20:00:07 +00:00
Luca Boccassi
6d69898240
Merge pull request #3794 from sigiesec/fix-ctx-shutdown
Problem: sockets can be created after calling zmq_ctx_shutdown
2020-01-26 18:09:47 +00:00
Simon Giesecke
36a8df2f8c Problem: sockets can be created after calling zmq_ctx_shutdown
Solution: fix handling of _starting and _terminate flags

Add tests for this situation.

Clarify documentation of zmq_ctx_shutdown and zmq_socket.

Fixes #3792
2020-01-26 18:06:14 +01:00
std-any-emplace
337ec270a4 EAGAIN: Refer to ZMQ_RCVTIMEO when receiving in blocking-mode 2020-01-25 20:04:59 +01:00
std-any-emplace
feb4f3d424 Fix minor typo 2020-01-23 20:09:08 +01:00
std-any-emplace
81d522bb66 Refer to zmq_socket because there are more thread-safe sockets than just client/server 2020-01-23 20:08:38 +01:00
std-any-emplace
8004c10f39 Documentation fix regarding thread-safety of zmq_poll/zmq_poller.txt.
See https://github.com/zeromq/libzmq/issues/3778.
2020-01-19 09:54:11 +01:00
Andrij Abyzov
5a854780f2 Problem: cannot send arbitrary data from XSUB to XPUB.
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.
2019-12-04 16:25:08 +01:00
Dries Harnie
ba6695c59a Problem: zmq_poller example is wrong
Solution: flipped arguments in example
2019-10-31 18:54:07 +01:00
Luca Boccassi
f24c019ec1
Merge pull request #3686 from trya/doc_sock_block
Fix documentation about sockets blocking on send operations
2019-09-23 20:50:44 +01:00
trya
4378d71247 Problem: Documentation about socket blocking on send operations is incorrect
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.
2019-09-23 02:13:04 +02:00
Francesco Montorsi
b3582da8fb Introduce extended set/get methods for ZMQ contexts (#3642)
* Introduce DRAFT zmq_ctx_set_ext() and zmq_ctx_get_ext() methods. Change
ZMQ_THREAD_NAME_PREFIX to allow for non-numeric thread name prefixes.
2019-08-27 23:41:23 +01:00
Luca Boccassi
60cca513a1
Merge pull request #3593 from jean-airoldie/doc_poller
Problem: behavior of closing a socket registered...
2019-07-24 11:03:14 +01:00
jean-airoldie
1bd94a979d Problem: behavior of closing a socket registered...
...in a poller is not documented.
Solution: Document it.
2019-07-24 05:59:29 -04:00
jean-airoldie
7675995fe8 Problem: incorrect ZMQ_MAX_SOCKETS default value in doc
Solution: update the doc with the correct default value
2019-07-22 20:37:00 -04:00
Luca Boccassi
0f01fb5134 Problem: markdown errors in zmq_getsockopt.txt
Solution: fix them
2019-07-08 10:47:27 +01:00
Luca Boccassi
364561953a Problem: zmq_disconnect documentation is confusing and breaks semantics
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.
2019-06-27 18:23:26 +01:00
Luca Boccassi
eba6fb2988 Problem: ZMQ_IN/OUT_BATCH_SIZE are dangerous
Solution: clearly advise users to avoid them in all cases to
avoid unforseen problems.
Also fix markdown syntax, applicable transport types and getter description.
2019-06-27 18:23:26 +01:00