Simon Giesecke
daadb65a46
Problem: inconsistency of using terms address and uri
...
Solution: use terms more consistently
2018-08-15 14:46:21 +02:00
Simon Giesecke
cdc6c66f9b
Problem: complexity of term_endpoint
...
Solution: extract resolve_tcp_addr function
2018-08-15 14:46:21 +02:00
Simon Giesecke
a2d736c14f
Problem: functionality around inprocs_t is scattered
...
Solution: extract into functions of new inprocs_t class
2018-08-15 14:46:21 +02:00
Simon Giesecke
fb576d2f95
Problem: unnecessary procedural code
...
Solution: replace by functional expression
2018-08-15 14:46:21 +02:00
Simon Giesecke
3455be144d
Problem: code duplication around sending of routing id
...
Solution: extract functionality into send_routing_id
2018-08-15 14:46:21 +02:00
Simon Giesecke
83f41526c9
Problem: code duplication around options_t::conflate
...
Solution: extract functionality into get_effective_conflate_option
2018-08-15 12:18:35 +02:00
Simon Giesecke
da30ff7d3d
Problem: unused get_credential methods and associated fields
...
Solution: remove them
2018-08-13 15:22:18 +02:00
Simon Giesecke
bbae67df89
Code style improvements
2018-08-10 15:36:31 +02:00
Simon Giesecke
758f903db4
Some code style improvements: removed redundant parentheses, added const, joined declaration and assignment of local variables
2018-08-09 12:41:08 +02:00
Simon Giesecke
9e2cf35b66
Reduced number of calls to container end method
2018-08-09 12:41:08 +02:00
Simon Giesecke
6357890ff6
Removed code duplication in process_commands
2018-08-07 10:17:12 +02:00
Michael Vilim
8a16fef3cc
Problem: ZMQ_CONNECT_ROUTING_ID can be assigned to incoming socket connection (Issue #3191 )
...
Solution: Add an identifier parameter for local attach to zmq::socket_base_t::attach_pipe
2018-07-26 18:26:35 -05:00
Simon Giesecke
c641644bb2
Problem: inconsistent parameter names
...
Solution: harmonize
2018-05-30 23:21:52 +02: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
bd76926f5b
Problem: code style issues in options_t (C-style cast, suboptimal std::string::find call, redundant method is_valid)
...
Solution: resolved these issues
2018-05-30 13:13:31 +02:00
Simon Giesecke
5a343fc27b
Problem: stream_t/router_t access data member of base class
...
Solution: pull up functionality to base class
2018-05-29 15:05:27 +02:00
Simon Giesecke
ab3895a470
Problem: duplicated code in stream_t & router_t
...
Solution: pulled up to routing_socket_base_t
2018-05-29 15:05:27 +02:00
Simon Giesecke
09fab930b3
Problem: xwrite_activated duplicated between stream_t and router_t
...
Solution: pull up into routing_socket_base_t
2018-05-29 15:05:27 +02:00
Simon Giesecke
728eddfcfd
Problem: socket_base_t::connect_routing_id is protected and only used in router_t and stream_t
...
Solution: add an intermediary base class routing_socket_base_t, move common functionality there and make connect_routing_id private
2018-05-29 15:05:26 +02:00
Simon Giesecke
a4c817e736
Problem: magic number "2" in socket_base.cpp
...
Solution: calculate from field sizes
2018-05-28 18:45:41 +02:00
Simon Giesecke
e3c73d9881
Problem: inconsistent naming style for private data members, conflicts with naming of local variables and member functions
...
Solution: apply and check _lower_case naming style for private data members
2018-05-27 13:24:07 +02:00
Simon Giesecke
eacc805646
Problem: complex unnecessary ternary expressions
...
Solution: simplify to comparison against 0
2018-05-26 09:34:44 +02: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
Simon Giesecke
4e616f30dd
Problem: C-style casts used
...
Solution: replace by C++-style casts
2018-05-18 17:04:01 +02:00
Simon Giesecke
c589f2b603
Problem: C4800 warning in socket_base.cpp
...
Solution: make proper boolean expression
2018-05-14 19:18:37 +02:00
Luca Boccassi
8b82ed50a2
Problem: Solaris Studio does not convert from char * to string
...
Solution: do it explicitly to fix build on Solaris 10/11 with the Sun
compiler
2018-05-13 13:16:37 +01:00
Lionel Flandrin
b0df4be51c
Problem: UDP engine does not support IPv6
...
Solution: Add IPv6 support
2018-05-09 12:06:23 +02:00
Simon Giesecke
87fbb5c447
Problem: socket poller shutdown asserts when context is terminating
...
Solution: do not call getsockopt to query thread-safety of a socket
2018-03-28 11:23:08 +02:00
Luca Boccassi
8d544ef1c4
Problem: formatting issues in the CI
...
Solution: commit clang-format-diff
2018-03-10 12:44:27 +00: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
Pontus.Skoeldstroem
7abb8388d6
Problem: Tests for different TIPC address types missing ( #2956 )
...
* Tests for different TIPC address types and code cleanup
* Adds tests for binding/connecting with different TIPC address types
using Unity
* Adds error checking for address type misuse
2018-03-07 17:31:26 +00:00
Simon Giesecke
6f967c3a13
Problem: code duplication in getsockopt/setsockopt
...
Solution: extracted common code into do_getsockopt/do_setsockopt functions
2018-03-06 16:41:30 +01:00
Luca Boccassi
541ca30d8e
Problem: make clang-format still shows error in the CI
...
Solution: run make clang-format-diff and commit the changes.
2018-03-05 22:41:11 +00:00
Stefan Kaes
fcbd2a5710
Problem: enormous memory increase due to zero copy decoding
...
The zero copy decoding strategy implemented for 4.2.0 can lead to a large
increase of main memory usage in some cases (I have seen one program go up to
40G from 10G after upgrading from 4.1.4). This commit adds a new option to
contexts, called ZMQ_ZERO_COPY_RECV, which allows one to switch to the old
decoding strategy.
2018-03-05 18:13:28 +01:00
Simon Giesecke
a1d55d0506
Problem: race conditions for options.linger ( #2910 )
...
* Problem: race conditions for options.linger
Solution: make options.linger atomic
2018-02-08 22:10:45 +00:00
Luca Boccassi
cb9ccfa154
Merge pull request #2921 from sigiesec/mechanism-cleanup
...
Problem: code style issues in mechanism_t and socket_base_t
2018-02-08 21:53:14 +00:00
sigiesec
06d805ff82
Problem: unnecessary complex operations in socket_base_t::term_endpoint
...
Solution: use simpler operations, construct std::string only once
2018-02-08 22:19:54 +01:00
sigiesec
5b510656d0
Problem: unreachable code around socket_base_t::add/remove_signaler
...
Solution: replaced by assertion
2018-02-08 22:16:30 +01:00
sigiesec
41f459e1dc
Problem: formatting inconsistent
...
Solution: applied clang-format
2018-02-02 15:47:43 +01:00
Bill Torpey
ec05166545
prevent duplicate connections from PUB sockets also (see https://github.com/zeromq/libzmq/issues/788 )
2017-12-29 14:36:59 -05:00
Simon Giesecke
a4aceb272b
Problem: use of std::map::insert is inefficient
...
Solution: use std::map::emplace instead, where available
2017-10-22 17:15:00 +02:00
Simon Giesecke
0897b3e07b
Problem: excessive memory allocations around blob_t ( #2796 )
...
* Problem: excessive memory allocations around blob_t
Solution: redefine blob_t as a custom type, and use reference/move
semantics where possible
2017-10-21 12:19:51 +01:00
Luca Boccassi
e3ee55b191
Problem: missing indentation for UDP branch
...
Solution: fix it
2017-10-09 13:52:56 +01:00
Luca Boccassi
c8f3f8a5da
Problem: ambiguos bitwise ANDs in if statements
...
Solution: wrap bitwise ANDs in brackets as the static analyzer suggests
2017-10-09 13:52:56 +01:00
Luca Boccassi
44f96a3652
Merge pull request #2745 from sigiesec/rename-identity
...
Problem: term "identity" is confusing
2017-09-20 10:08:45 +02:00
sigiesec
9e7507b38b
Problem: term "identity" is confusing
...
Solution: replace by "routing id"
2017-09-19 17:53:44 +02:00
Luca Boccassi
edb4ca1023
Problem: zmq_connect fails after disconnect due to RECONNECT_IVL == -1
...
Solution: when a connection breaks and ZMQ_RECONNECT_IVL is set to -1,
which means a reconnection will not be attempted, send a message from
the I/O thread to the application thread to make the socket call
term_endpoint, which is the equivalent of manually calling
zmq_disconnect.
This way subsequent zmq_connect call to the same endpoint will attempt
again to do a connection.
Otherwise, for some socket types like SUBs, those new connects will
fail as the endpoint is recorded, despite the connection having been
permanently closed.
Add test cases to exercise this corner case with TCP and IPC.
2017-09-19 14:05:43 +01:00
Doron Somech
af03241dcb
Revert "Problem: term "identity" is confusing"
2017-09-07 15:47:43 +03:00
sigiesec
1daf83079a
Problem: term "identity" is confusing
...
Solution: replace by "routing id"
2017-09-06 17:45:56 +02:00
Luca Boccassi
31089326fb
Problem: unused variables warnings in get_peer_state
...
Solution: wrap arguments with LIBZMQ_UNUSED
2017-09-01 19:57:00 +01:00