Commit Graph

46 Commits

Author SHA1 Message Date
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
737927e333 Fixed spelling of parameter 2018-08-09 18:27:01 +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
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
1432011277 Problem: inconsistent local variable naming
Solution: configured clang-tidy check and applied fixes
2018-05-26 09:34:44 +02:00
Simon Giesecke
e37fc47fb6 Problem: return value is stored but never used
Solution: add code to make non-use explicit
2018-05-17 15:05:41 +02:00
sigiesec
41f459e1dc Problem: formatting inconsistent
Solution: applied clang-format
2018-02-02 15:47:43 +01: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
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
Brian Silverman
273b54715e Use memcpy instead of assuming option values are aligned
Otherwise, it's undefined behavior. ubsan catches alignment issues in
the libzmq test suite without this.
2016-02-06 22:22:51 -05:00
Pieter Hintjens
27a8961c37 Problem: resolution of int optval_ was made more verbose
There's no value in this as the same pattern is repeated in several
places and it's fair to expect people to understand it.

Solution: revert to the old, one-liner style.
2016-02-06 14:12:43 +01:00
Brian Silverman
f4fe375bd1 Don't call memcpy with 0 size and NULL pointer(s)
It's undefined behavior, and ubsan flags it.
2016-02-05 14:04:22 -05:00
Constantin Rack
a539b0c6e8 Problem: copyright year is still 2015
Solution: update to 2016
2016-01-28 15:07:31 +01:00
Pieter Hintjens
7be6ad0504 Replaced tabs in some files, with spaces 2015-09-11 13:03:31 -04:00
Joe Eli McIlvain
33419425eb Problem: Private/internal macros defined in public header.
Solution: Move the macros to a private header.
2015-08-21 16:12:22 -07:00
reza.ebrahimi
63260d8701 rename ZMQ_UNUSED macro to LIBZMQ_UNUSED 2015-08-22 00:31:25 +04:30
reza.ebrahimi
bff2284a50 place a ZMQ_UNUSED macro and replace all unused variables with ZMQ_UNUSED macro 2015-08-14 15:40:39 +04:30
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
Martin Hurton
e46ec31209 Implement socket_base_t::get_credential member function
The get_credential () member function returns
credential for the last peer we received message for.
The idea is that this function is used to implement user-level API.
2014-01-13 00:40:27 +01:00
Pieter Hintjens
b3b9e046ee Updated copyright statements for 2014 2014-01-02 12:00:57 +01:00
Shawn J. Goff
6a18f59532 Change name of icanhasall to subscribe_to_all
icanhasall is cute (for now), but the effect of the variable is clear
only after tracking down its origin reading the commit. This change is
intended to make it easier for people to have some intuition about its
effect from its name.
2013-08-31 10:02:05 -04:00
Evan Burkitt
eaf227d4de get to clean compile under vs2012
Added some missing (but existing in branch) files to libzmq11 project needed
to compile as static library by VS2012 (at least), and fixed some warnings.
One warning remains in raw_decoder.cpp, which I'm leaving for now because I'm
not sure how project owners would like to fix it.
2013-08-23 17:14:03 -07:00
Christian Kamm
c56d797bf9 REQ sockets drop replies from unasked peers.
* Add lb_t::sendpipe() that returns the pipe that was used for sending,
  similar to fq_t::recvpipe().
* Add forwarder functions to dealer_t to access these two.
* Add logic to req_t to ignore replies on pipes that are not the one
  where the request was sent.
* Enable test in test_spec_req.
2013-07-14 07:55:47 +02:00
Martin Hurton
fd7e9b8c46 Use generic session class whenever possible 2013-06-29 11:27:03 +02:00
shripchenko
627190c8be another iteration on ZMQ_PROBE_ROUTER
now it properly works for ROUTER
2013-06-10 02:31:00 -07:00
Martin Hurton
c3e40736de Rename terminated->pipe_terminated 2013-06-06 13:28:21 +02:00
Pieter Hintjens
a9679da764 Packaging on ZMQ_PROBE_ROUTER
- renamed to ZMQ_PROBE_ROUTER
2013-06-05 15:55:15 +02:00
shripchenko
97324398a7 refactored ZMQ_ROUTER_ANNOUNCE_SELF code. renamed it to ZMQ_PROBE_NEW_PEERS.
implement it for DEALER tocket.
+documentation
2013-06-05 15:29:40 +02:00
shripchenko
f805e4dd03 changed option name. +documentation changes 2013-05-24 07:09:53 -07:00
shripchenko
aec989fb5d small refactoring 2013-05-23 02:02:18 -07:00
shripchenko
51750a7d2a refactored ZMQ_ROUTER_ANNOUNCE_SELF code. renamed it to ZMQ_PROBE_NEW_PEERS.
implement it for DEALER tocket.
+documentation
2013-05-23 01:49:40 -07:00
Pieter Hintjens
0e77d65f12 Removed pointless comment 2013-03-12 16:15:54 +01: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
Martin Hurton
66dc4d8b54 Don't pass flags to xrecv method 2012-11-09 17:18:14 +01:00
Martin Hurton
7865f96e97 Don't pass flags to xsend method 2012-11-09 17:18:10 +01:00
Martin Hurton
b78800e467 Simplify implementation of DEALER socket 2012-11-09 15:45:25 +01:00
Martin Hurton
82999f2d20 Don't forward identities to DEALER sockets 2012-11-09 13:49:38 +01:00
Arthur O'Dwyer
3b984d40e9 Silence all "unused parameter" warnings from Clang.
Compiling without warnings is a good goal, because it makes
new warnings (which probably indicate bugs) stand out rather
than getting lost in the spam.

My fixes fall into two categories:

    - Adding (void) casts of unused parameters, where their
      unusedness seems like a TODO (or in some cases a bug?).

    - Removing parameter names altogether, where the function
      is clearly a stub that will never use its parameters.

Should be no change in behavior.
2012-08-27 16:05:51 -07:00
Martin Hurton
1ab85f471a Exchange greeting messages for all socket types
Fixes #415.
2012-08-11 19:04:49 +02:00
Martin Hurton
24b79c7e0b Prefer errno_assert/alloc_assert to zmq_assert 2012-05-28 23:17:03 +02:00
Martin Hurton
2cbf7993dc fq: remove unused parameter
The recv function accepted flags parameter but this was unused.
2012-04-26 13:21:25 +02:00
Pieter Hintjens
c12fedc70a Completed internal renaming of XREP/XREQ to ROUTER/DEALER 2012-03-22 11:36:19 -05:00
Martin Sustrik
e4f98d1e10 ROUTER and DEALER sockets removed
To be replaced by new generic socket type

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-15 08:16:40 +02:00
Martin Sustrik
a28928fe37 Introduce ZMQ_ROUTER and ZMQ_DEALER sockets
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-20 13:36:18 +02:00