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

469 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
Tobias Schlüter
2ac9755ee9 Remove Windows-specific defines from zmq.h.
These are redundant with the ones in windows.hpp
and aren't needed for the public interface.
2021-05-26 16:04:24 +01:00
Chengye Ke
04c37982b1
Support so_busy_poll (#4188)
* Support so_busy_poll.
2021-05-14 23:05:56 +01:00
Bill Torpey
6bf7728e6e ZMQ_RECONNECT_STOP options are intended to be inclusive (i.e., can be OR'ed together), and so values must be powers of two 2021-04-28 10:30:35 -04:00
Luca Boccassi
cef3225370 Problem: 4.3.4 is out, need new version
Solution: bump to 4.3.5
2021-01-17 12:10:01 +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
22d218a182 Problem: CI fails with formatting errors
Solution: run make clang-format-diff
2020-09-28 10:30:20 +01:00
C-sir
d4f03edd47
stop reconnect after called zmq_disconnect() (#4053) 2020-09-28 09:59:57 +01:00
Davit Kalantaryan
dfc85af4d0
using '_M_ARM' macros for Windows ARM comilation (#4051)
[why]
This is a standard microsoft compiler macros https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019
This macros is defined for example for Windows 10 core Iot (for example paspberry pi windows compilation)

Co-authored-by: Davit Kalantaryan <davit.kalantar@desy.de>
2020-09-26 18:39:28 +01:00
Luca Boccassi
f2e364777e Problem: 4.3.3 is out, need new version
Solution: bump to 4.3.4
2020-09-07 11:12:14 +01: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
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
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
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
4f45ac135a Problem: formatting not up to date
Solution: run make clang-format-diff
2020-02-23 18:25:20 +00: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
05194eb549 problem: maximum size of group doesn't match the RFC maximum size 2020-02-09 14:46:23 +02: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
somdoron
7296fb5b15 problem: unsecured websocket is rarely used in production
Solution: support websocket with tls (wss)
2019-10-02 08:58:26 +03:00
Tobias Schlüter
cb211e4f1e Problem: inclusion of winsock2.h leads to ordering issues in user code.
Solution: don't include winsock2.h, replace its only use (reference to SOCKET) by explicitly naming underlying type.
2019-09-13 14:15:37 +09: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
Brian Carcich
853aa9801e Problem: include/zmq.h is not so much broken as inconsistent in
how it declares the file descriptor (fd) of a socket
          in struct zmq_pollitem_t vs. struct zmq_poller_event_t

Solution:  Make include/zmq.h consistent in this matter
2019-07-26 20:31:44 -04:00
somdoron
39941a0c82 problem: browser cannot communicate with zeromq directly
Solution: implement ZWS 2.0 which websocket transport for zeromq
2019-07-16 10:12:20 +03:00
Luca Boccassi
491a0ae107 Problem: 4.3.2 is out, need new version
Solution: bump to 4.3.3
2019-07-08 17:57:12 +01:00
jean-airoldie
cfcab66c71 Problem: {in,out}_batch_size must be configured at compiled time
Solution: Added a socket option to configure them at runtime.
2019-06-27 02:31:11 -04:00
Christophe Guillon
58c30dc7d1 Add support for SOCKS5 basic authentication 2019-06-10 16:40:06 +02:00
Luca Boccassi
19ff4d0b6a Problem: zmq_socket_monitor_versioned_typed duplicates zmq_socket_monitor_versioned
Solution: unify the two APIs, as they are both still in DRAFT state and
thus can be changed.
2019-05-18 16:44:07 +01:00
imkcy9
2f98f7034b Support XPub socket send last value caching to last subscription pipe with ZMQ_XPUB_MANUAL_LAST_VALUE. (#3511)
* Add ZMQ_XPUB_MANUAL_LAST_VALUE

* Surpport xpub send last value caching to one pipe with ZMQ_XPUB_MANUAL_LAST_VALUE

* Add test_xpubub_manual_last_value

* Add relicense and doc
2019-05-17 22:12:32 +01:00
jean-airoldie
606a8f7967 Problem: Socket monitoring only allows ZMQ_PAIR
Solution: Allow ZMQ_PUB and ZMQ_PUSH sockets types for the monitoring.
This way someone could create a ZMQ_PULL socket connected to multiple
monitoring sockets at the same time.
2019-05-15 01:48:46 -04:00
Simon Giesecke
d46c580977 Problem: signature of zmq_poller_fd does is incompatible with regular error handling
Solution: change return type to int (again) and return fd via an output parameter
2019-05-09 11:09:35 -04:00
Simon Giesecke
63c4d8be78 Problem: syntax error on Windows related to socket descriptor type
Solution: use proper fd_t type, and also define and use a zmq_fd_t in the API
2019-05-09 07:21:08 -04:00
jean-airoldie
046534480b Problem: Cannot get thread safe socket fd
Solution: Add a method to get the zmq_poller's signaler fd. Then we can
associate a poller instance with every thread safe socket and use its
fd.
2019-04-27 22:58:42 -04:00
Luca Boccassi
feadf6d40f Problem: cannot monitor state of queues at runtime
Solution: add API and ZMQ_EVENT_PIPES_STATS event which generates 2
values, one for the egress and one for the ingress pipes respectively.
Refactor the events code to be able to send multiple values.
2019-02-10 16:33:26 +00:00
Luca Boccassi
a9a5b2bde5 Problem: DRAFT build broken on old Windows
Solution: define uint64_t if not available in the system headers and
remove inclusion of inttypes.h which does not exist and is already
conditionally included in zmq.h if required, do not use PRIx64
2019-02-03 22:11:52 +01:00
Simon Giesecke
482a3a2272 Problem: documented constants are not defined
Solution: add definition to zmq.h
2019-02-02 15:33:27 +01:00
Simon Giesecke
01371398e9 Problem: monitor events are unversioned
Solution: add monitor event socket option
2019-02-02 15:33:27 +01:00
Luca Boccassi
73d41cec57 Problem: versions are out of date
Solution: bump ABI and revisions and changelog now that v4.3.1 is out
2019-01-12 16:10:36 +00:00
Luca Boccassi
fbf37bb668 Problem: 4.3.0 is released, need to update ABI/version
Solution: bump to 5.2.1 and 4.3.1 respectively
2018-11-28 20:06:23 +00:00
Luca Boccassi
35c6985e68 Problem: zmq_stopwatch_intermediate is eligible for STABLE
Solution: do it
2018-11-18 13:23:38 +00:00
Luca Boccassi
92cf6c6451 Problem: new ctx THREAD options are eligible for STABLE
Solution: do it
2018-11-18 13:23:38 +00:00
Luca Boccassi
c347aef794 Problem: new DRAFT monitoring events are eligible for STABLE
Solution: do it
2018-11-18 13:23:38 +00:00
Luca Boccassi
1f3d4dfbea Problem: wrong new version
Solution: bump back from 4.3.1 to 4.3.0
2018-11-01 20:14:30 +00:00
Szekely Gyorgy
2cdad3d0ce Add ZMQ_ROUTER_NOTIFY draft socket option (#3213)
* Add ZMQ_ROUTER_NOTIFY draft socket option
2018-08-15 08:54:08 +01:00
Luca Boccassi
3159161cef Problem: zmq_timers_* are ready for STABLE
Solution: move them from DRAFT state to STABLE
2018-07-27 23:07:56 +01:00
Simon Giesecke
c581f43c97 Problem: parameter naming style inconsistent
Solution: define and apply parameter naming style: lower_case_
2018-05-26 09:34:44 +02:00
Lionel Flandrin
99412c810d Problem: ZMQ doesn't expose the MULTICAST_LOOP socket option
Solution: add a new ZMQ_MULTICAST_LOOP option for UDP sockets.
2018-05-10 19:24:46 +02:00