0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-28 07:58:14 +08:00

60 Commits

Author SHA1 Message Date
C-sir
d4f03edd47
stop reconnect after called zmq_disconnect() (#4053) 2020-09-28 09:59:57 +01:00
Gudmundur Adalsteinsson
e18772f942 Problem: -1 used for invalid socket
Solution: use retired_fd instead
2020-04-29 17:12:08 +00:00
Simon Giesecke
41e3f14d6a Problem: ptr/ref parameters and local variables are non-const but never modified
Solution: add const
2020-01-27 10:38:00 +01:00
Simon Giesecke
66d0f3511f Problem: ipc transport not supported under Windows
Solution: implement support
2019-10-29 23:04:54 +01:00
somdoron
157b2a2ee0 problem: ws_engine duplicate code from stream_engine
Solution: New class called stream_engine_base which is inherited by ws_engine, zmtp_engine and raw_engine.
2019-07-18 11:28:08 +03:00
Simon Giesecke
e583276380 Problem: unnecessary platform-specific code parts around socklen_t
Solution: use zmq_socklen_t
2019-02-05 03:34:32 -05:00
Simon Giesecke
87082557f0 Problem: stream_connecter_base_t does not set local address
Solution: pass the local address by subclasses to create_engine
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
Simon Giesecke
7e73587741 Problem: duplication in *_event methods across subclasses of stream_connecter_base_t
Solution: pull up common code, introduce new create_engine function in base class
2019-02-01 04:58:57 -05:00
Simon Giesecke
a09099a615 Problem: process_term and close duplicated across subclasses of stream_connecter_base_t
Solution: pull up
2019-02-01 04:58:57 -05:00
Simon Giesecke
531df586d0 Problem: rm_fd code duplicated across stream_connecter_t subclasses
Solution: pull up tcp_connecter_t::rm_handle and use in all subclasses
2019-02-01 04:58:57 -05:00
Simon Giesecke
1a230e89ca Problem: process_plug, get_new_reconnect_ivl and add_reconnect_timer duplicated across subclasses of stream_connector_base_t
Solution: pull up to stream_connector_base_t
2019-02-01 04:58:57 -05:00
Simon Giesecke
74667ebcba Problem: destructors of tcp_connecter_t, ipc_connecter_t, tipc_connecter_t contain duplicated code
Solution: pull up to stream_connecter_base_t
2019-02-01 04:58:57 -05:00
Simon Giesecke
d6f8d246e2 Problem: data members are duplicated across tcp_connecter_t, ipc_connecter_t, tipc_connecter_t
Solution: extract common base class stream_connecter_base_t
2019-02-01 04:58:47 -05:00
Simon Giesecke
a13eb1a9d8 Problem: ipc_connector_t::_handle_valid is redundant
Solution: replace by checks against valid value of _handle
2019-02-01 04:33:03 -05:00
Simon Giesecke
ca87aaed57 Problem: ipc_connector_t::_timer_started is unspecifically named
Solution: rename to _reconnect_timer_started
2019-02-01 04:33:03 -05:00
Simon Giesecke
58063a75a2 Problem: ipc_connector_t data members not conforming to naming conventions
Solution: add underscore prefix to data members
2019-02-01 04:33:03 -05:00
ehilscher
0867c38032 Problem: connecter classes do not handle ZMQ_RECONNECT_IVL of -1 (#3163)
* Problem: connecter classes do not handle ZMQ_RECONNECT_IVL of -1

Solution: Add guards to prevent a reconnect timer from starting if ZMQ_RECONNECT_IVL is -1
(Issue 3158)
2018-06-12 23:23:39 +01:00
Simon Giesecke
0179b7577a Problem: literals protocol names used at various places
Solution: introduced named constants
2018-05-30 22:50:29 +02:00
Simon Giesecke
d767909b50 Problem: old C-style casts used
Solution: replace by static_cast/reinterpret_cast
2018-05-27 13:24:07 +02:00
Manuel Segura
4726f7262d Pull request to merge porting to WindRiver VxWorks 6.x (#2966)
* Problem: Still need to port over more files to VxWorks 6.x

Solution: Port more files to VxWorks 6.x

* Problem: Need to port over remaining files to VxWorks 6.x. Also remove POSIX thread dependency for VxWorks (because of priority inversion problem in POSIX mutexes with VxWorks 6.x processes)

Solution: Port over remaining files to VxWorks 6.x. Also removed POSIX thread dependency for VxWorks

* Problem: Needed to modify TCP, UDP, TIPC classes with #ifdefs to be compatible with VxWorks 6.x.

Solution:  Modify TCP, UDP, TIPC classes with #ifdefs to be compatible with VxWorks 6.x
2018-03-10 11:03:02 +00:00
sigiesec
41f459e1dc Problem: formatting inconsistent
Solution: applied clang-format
2018-02-02 15:47:43 +01:00
evoskuil
2b798e486a Problem: name conflicts from windows.h, draft API declared in pch. 2016-05-13 20:41:26 -07:00
hitstergtd
b2d0ab18f2 Problem: trailing whitespace in code
Solution: fix them
2016-04-25 12:18:46 +01:00
Osiris
4a5af9d58b Problem: Precompiled headers not being used
Solution: Phase I - make precompiled.hpp be first file included in every source file
2016-02-18 10:56:52 -06:00
Constantin Rack
a539b0c6e8 Problem: copyright year is still 2015
Solution: update to 2016
2016-01-28 15:07:31 +01:00
Laszlo Boszormenyi (GCS)
be5ab6d5c9 GNU/Hurd support 2016-01-16 02:26:20 +01:00
Constantin Rack
bd923f0fbb Problem: some comments contain typos 2015-09-06 18:46:32 +02:00
Pieter Hintjens
8620c3e032 Problem: source file headers are somewhat confusing about LGPLv3
Of course people still "can" distributed the sources under the
LGPLv3. However we provide COPYING.LESSER with additional grants.

Solution: specify these grants in the header of each source file.
2015-06-02 22:33:55 +02:00
Pieter Hintjens
94d9a4ffdf Problem: copyright statements are out of date
Solution: update for 2015

Fixes #1320
2015-01-22 10:32:37 +01:00
Pieter Hintjens
b3b9e046ee Updated copyright statements for 2014 2014-01-02 12:00:57 +01:00
Pieter Hintjens
f909b9c722 plain_mechanism now uses options.as_server
- we need to switch to PLAIN according to options.mechanism
- we need to catch case when both peers are as-server (or neither is)
- and to use username/password from options, for client
2013-05-17 17:21:59 +01:00
Martin Hurton
4eecda8af3 Implement ZMTP/3.0 PLAIN mechanism
This implements protocol handshake.
We still need to design and implement 1) API changes so a user
can set username and password, and 2) a mechanism for engine
to authenticate users.
2013-05-14 11:20:13 +02:00
Pieter Hintjens
f0f16505e5 Removed corporate advertisements from source file headers
Copyrights had become ads for Sustrik's corporate sponsors, going against the original
agreement to share copyrights with the community (that agreement was: one line stating
iMatix copyright + one reference to AUTHORS file). The proliferation of corporate ads
is also unfair to the many individual authors. I've removed ALL corporate title from
the source files so the copyright statements can now be centralized in AUTHORS and
source files can be properly updated on an annual basis.
2013-03-12 13:24:57 +01:00
Lourens Naudé
6d245eb6bc Copy monitor specific event endpoints to event messages as the engine etc. can be released at anytime 2012-11-17 11:29:47 +00:00
Pieter Hintjens
4ba34c9d70 Whitespace and style fixes 2012-10-24 09:18:52 +09:00
Lourens Naudé
759d453368 Significantly reworked the monitoring infrastructure with a more granular per socket API and to play well with monitoring endpoints in application threads 2012-09-21 12:53:31 +01:00
Lourens Naudé
9dc248f6ab Fix invalid address metadata for ZMQ_EVENT_DISCONNECTED 2012-08-04 11:41:33 +01:00
Martin Hurton
c84ca01e95 Be more conservative about when to generate ZMQ_EVENT_CLOSE_FAILED
This also fixes a bug in tcp_connecter and tcp_listener, which
generated the event not when they failed to close the socket but
when the succeed to close it.
2012-07-11 19:02:31 +02:00
Martin Hurton
919bd9628d {tcp|ipc}_connecter: check whether socket is valid before closing it
Calling close () when the underlying socket is invalid
triggers an assertion failure.
2012-06-15 02:38:47 +02:00
Martin Hurton
ec9f8994a7 Simplify {tcp|ipc}_connecter
Make start_connecting () to have singe exit point.
2012-06-15 02:03:20 +02:00
Martin Hurton
e0fed9d29a Simplify {tcp|ipc}_connecter
The patch is meant to make the code easier to understand.
The 'wait' attribute is replaced by 'delayed_start'
and 'timer_started' attributes. The former is constant and
is initialized in the constructor. The latter is a flag
reflecting whether a timer has been started and changes during
the lifetime of the object.
2012-06-15 01:55:13 +02:00
Ian Barber
bdd4e1351d Revert "Revert "Merge branch 'master' of github.com:zeromq/libzmq""
This reverts commit dde69fb9fb928db1850eb209db7aed79e26777fb.
2012-06-12 14:28:32 +01:00
Ian Barber
dde69fb9fb Revert "Merge branch 'master' of github.com:zeromq/libzmq"
This reverts commit 7b10586558268479e62ed901f3d8d76916bc6c8a, reversing
changes made to 33459029793474d14cdb48f85ad2c58dc7ed156f.
2012-06-12 14:12:03 +01:00
Martin Hurton
3ec8e576d9 Fix race conditions in {tcp,ipc}_connecter
Once the object has been terminated, it is unsafe for this object
to refer to its parent.

The bug was responsible for occasional
test_shutdown_stress failures.
2012-06-12 01:47:31 +02:00
Lourens Naudé
c38aecdc50 Merge branch 'master' into events 2012-05-04 02:35:22 +01:00
Lourens Naudé
5c6f72c17c ZMQ_MONITOR socket option registers a callback / event sink for changes in socket state 2012-05-04 02:32:46 +01:00
Ian Barber
1075005b50 Patch from Mato that fixes a subtle connect bug: EAGAIN was being used as a translation value for EINPROGRESS, thus
shadowing a real EAGAIN return value from the OS.  This caused later
assertions of "Invalid argument" in stream_engine.cpp when it attempted to
use a socket which was not connected.

I also add EINTR to mean EINPROGRESS, as per the POSIX and FreeBSD
documentation which specifies that a connect() call interrupted due to a
signal will complete asynchronously.

Signed-off-by: Martin Lucina <martin@lucina.net>
2012-05-03 13:24:12 +01:00
Martin Hurton
0a6fc02702 fix connection establishment for AF_UNIX sockets 2012-03-20 19:04:12 +01:00
Staffan Gimåker
b9fb48f47b Resolve addresses in the calling thread on connect.
This allows us to actually report an error to the caller on resolve
failure, rather than asserting later on in the io thread.

Signed-off-by: Staffan Gimåker <staffan@spotify.com>
2012-02-16 14:42:55 +01:00