Commit Graph

25 Commits

Author SHA1 Message Date
Alberto Invernizzi
eddeaf44ca fix CHECK_THROWS_AS usage
"Note that the exception type is extended with const& and you should not include it yourself."

according to https://github.com/catchorg/Catch2/blob/devel/docs/assertions.md#exceptions
2021-06-30 07:14:13 +02:00
Alberto Invernizzi
b6420aa22f fix header 2021-06-30 07:14:13 +02:00
Gudmundur Adalsteinsson
f428fee374
Problem: zmq_fd_t not used/available in zmq (#452)
* Problem: zmq_fd_t not used/available in zmq

Solution: Make zmq::fd_t available and use in poller_event

* Deprecate typedef with comment
2021-02-12 12:28:40 +01:00
Gudmundur Adalsteinsson
1fc3a9a873 Document macro usage and simplify code 2020-05-24 21:34:42 +00:00
Gudmundur Adalsteinsson
6d71b9b541 Replace checks for C++17 with string view macro 2020-05-16 12:39:54 +00:00
Gudmundur Adalsteinsson
a3e5b54c3c
Problem: Socket options lack type-safety (#393)
Solution: Implement a type for each socket option.

Each option has an associated type, therefore they
can't be simply defined as an enum class.

Use new sockopt getter in test util

Add socket option get function for strings and tests
2020-03-24 09:33:50 +01:00
Simon Giesecke
b6c79eb0c8 Reformat all files with clang-format 2020-01-28 11:11:31 +01:00
Gudmundur Adalsteinsson
4b443fc59b Clarify example requirements 2019-09-14 20:10:47 +00:00
Simon Giesecke
86876d7307
Merge pull request #328 from xiphon/fix-recv-flags-default
Fix 'recv' function 'flags_' argument default value
2019-07-24 14:42:31 +02:00
xiphon
19b5222e4e Fix 'recv' function 'flags_' argument default value 2019-06-02 02:01:42 +00:00
Gudmundur Adalsteinsson
09ab20801a Problem: message_t ctor for ranges too greedy
Solution: Detect ranges with enable_if idiom
2019-05-15 16:49:22 +00:00
Gudmundur Adalsteinsson
88cee88d08 Change recv and send to return optional types 2019-05-10 14:22:04 +00:00
Gudmundur Adalsteinsson
99d98dd217 Improved enum flags operators and tests 2019-05-09 22:33:49 +00:00
Simon Giesecke
9a60ad3fc8
Apply suggestions from code review
Co-Authored-By: gummif <ofpgummi@yahoo.com>
2019-05-08 21:37:14 +00:00
Gudmundur Adalsteinsson
3d4be814e8 Problem: send/recv functions lack type-safety
Solution: Add functions taking buffers and enum class flags
2019-05-05 22:05:47 +00:00
Gudmundur Adalsteinsson
c6a3529cd1 Problem: No type-safe alternatives when polling or needing a reference to a socket
Solution: Introduce a socket_ref that is a non-owning nullable reference to a socket
2019-04-19 22:10:26 +00:00
Gudmundur Adalsteinsson
4ceabb37b6 Problem: socket_t can not be default constructed
Solution: Provide a default constructor
2019-04-14 12:21:30 +00:00
Gudmundur Adalsteinsson
83b91c8b7e Problem: Missing swap functions
Solution: Implement for socket_t, context_t, message_t and poller_t
Additionally remove dependency on <functional> by refactoring poller_t
and remove unused <unordered_map> include.
2019-04-03 13:23:17 +00:00
Gudmundur Adalsteinsson
1eedfaf9a5 Problem: proxy is not typesafe
Solution: Add overloads to proxy and proxy_steerable taking socket_t
objects
2019-03-31 22:30:10 +00:00
Pawel Kurdybacha
ae15964907 Problem: Dependency on googletest framework
Currently cppzmq as relatively simple and header only library depends on rather
complex unit test framework googletest.
Current issues:
- Googletest requires downloading and building it every time on travis
as cache support is limited there
- Googletest build is signifficant with comparison to cppzmq unittests
total runtime

Solution: Port existing tests to Catch - header only C++ framework and
gain ~20% build speed up on travis.

Why Catch?
It is well know C++ header only testing framework. It works well, it is
being kept up to date and maintainers seem to pay attention to
community's comments and issues.
We can not use Catch2 currently as we still support pre-C++11 compilers.
2018-10-17 15:22:07 +01:00
Simon Giesecke
120c7ae3f2 Problem: no test case for previously existing send functionality
Solution: added test case
2018-08-21 13:50:02 +02:00
Pawel Kurdybacha
ff3c221516 Problem: whitespace style too restrictive.
For header only library like cppzmq, whitespace style inherited from
libzmq is too restrictive.

Solution: relaxing whitespace before parens from always to in control
statements only, increased max column width from 80 to 85 and removing
requirement of whitespace after template keyword.
2018-05-12 17:28:28 +01:00
Pawel Kurdybacha
5031278f18 Problem: project files do not follow clang-format 2018-05-11 20:29:15 +01:00
Simon Giesecke
83f854869a Problem: no tests for socket_t ctor accepting enum socket_type
Solution: added test case
2018-04-03 18:41:44 +02:00
Simon Giesecke
1616c0fad2 Problem: test file not correctly named
Solution: move and split example_add.cpp
2018-04-03 18:41:44 +02:00