Stefan Dietel
2dcab86425
add test for using active poller on monitor
2023-08-25 16:19:55 +02:00
Stephan Schim
dd67d56eae
unit test for active_poller and poller_t support for file descriptors
2023-07-19 17:06:48 +02:00
Gudmundur Adalsteinsson
326a994c5f
Problem: Intermittent monitor test failures
...
Solution: Do not require delayed connection event
2022-10-09 13:53:58 +00:00
nandanv
60aa6ad515
Updating Catch2 v2 to v2.13.9
...
Fixes issue with MINSIGSTKSZ which is no longer a constant -> https://github.com/JuliaLang/julia/issues/39822
Issue was fixed in https://github.com/catchorg/Catch2/releases/tag/v2.13.5
2022-06-15 20:43:02 +05:30
Jaakko Moisio
cbe449908e
Problem: sock.get(zmq::sockopt::type)
is not typesafe
...
Solution: Add `zmq::sockopt::socket_type` that is used to `get()` an enumerator
from `zmq::socket_type` instead of plain `int`.
It makes code like this compile:
#include <zmq.hpp>
#include <cassert>
int main()
{
zmq::context_t ctx;
zmq::socket_t sock(ctx, zmq::socket_type::push);
assert(sock.get(zmq::sockopt::socket_type) == zmq::socket_type::push);
return 0;
}
2021-10-21 20:53:40 +03:00
Geir Henning Eikeland
14f304f987
Add == and != operators for multipart_t
...
Closes #512
2021-09-11 22:31:42 +02:00
Gudmundur Adalsteinsson
4c08773f86
Coveralls upload in actions
2021-07-15 21:58:53 +00:00
Gudmundur Adalsteinsson
11bbef7d2b
Tests require full 11 support
2021-07-13 22:56:19 +00:00
Gudmundur Adalsteinsson
851e7bcb8b
Tests require full 11 support
2021-07-13 22:54:26 +00:00
Alberto Invernizzi
3d86f2a288
remove duplicated include Catch
2021-06-30 08:30:36 +02:00
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
Alberto Invernizzi
197f8d2516
update cmake for catch2
2021-06-30 07:14:13 +02:00
Dominic van Berkel
b65dde8725
Add support for socket_ref to multipart_t ctor/send/recv ( #487 )
...
* Add support for socket_ref to multipart_t ctor/send/recv
Fixes #448
2021-04-27 16:41:21 +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
Simon Giesecke
18db4568f9
Merge pull request #451 from gummif/gfa/poller-size
...
Problem: Poller size function missing
2020-11-25 10:00:04 +01:00
Gudmundur Adalsteinsson
0f9e4c12d0
Problem: Changes in Catch2 causes errors
...
Solution: Use a fixed commit instead of a branch
2020-10-25 18:04:25 +00:00
Gudmundur Adalsteinsson
2af0c0105a
Problem: Poller size function missing
...
Solution: Add it to poller_t
2020-10-10 21:22:16 +00:00
Simon Giesecke
fef905d598
Merge pull request #399 from gummif/gfa/message-ctor
...
Problem: message_t ctor string inconsistency
2020-09-08 11:42:55 +02:00
Gudmundur Adalsteinsson
1897488a28
Problem: message_t ctor string inconsistency
...
Solution: Constuctor taking generic ranges including
string literals includes the null terminated char in
the message. Deprecate function and add overloads
for strings.
2020-09-07 21:37:01 +00:00
Simon Giesecke
bf4f75b971
Merge pull request #405 from gummif/gfa/active-poller-handler
...
Problem: Active poller double add mutates handler
2020-09-07 10:01:26 +02:00
Gudmundur Adalsteinsson
d237615a25
Problem: Active poller double add mutates handler
...
Solution: Check if socket already added before storing.
2020-09-06 13:46:08 +00:00
or17191
37e6334d5f
Bugfix: socket_t move assignment doesn't initialize ctxptr
...
Until now, we only assigned the _handle on
`zmq::socket_t::operator=(socket_t&&)`. This manifests when trying to
monitor a socket initialized by that constructor.
To avoid changing the public interface of the socket_t class, we tested
for the specific monitor usecase, since it's the only class accessing
zmq::socke_t::ctxptr.
NOTE: When running the new unit-test without the fix, it might hang on
`zmq_socket_monitor(socket_, NULL, 0)`. We haven't figured out the cause
for that, but we deemed it unimportant (or at least out of scope).
2020-07-18 19:17:19 +03:00
Simon Giesecke
89f4d1b187
Merge pull request #408 from gummif/gfa/ctx-handle
...
Problem: implicit conversion operators in context
2020-06-19 18:10:38 +02:00
Simon Giesecke
452f736fb7
Merge pull request #416 from gummif/gfa/macro-doc
...
Problem: Feature checking inconsistencies
2020-06-19 18:02:51 +02:00
Gudmundur Adalsteinsson
8b64a341ac
Add requirement that the handler is non-null in active_poller
2020-05-24 22:38:35 +00:00
Gudmundur Adalsteinsson
e9c5546e04
Add CHECK_THROWS_ZMQ_ERROR and check error codes
2020-05-24 22:16:55 +00:00
Gudmundur Adalsteinsson
d2c5fef2c1
Apply clang-format
2020-05-24 21:53:56 +00:00
Gudmundur Adalsteinsson
1fc3a9a873
Document macro usage and simplify code
2020-05-24 21:34:42 +00:00
Gudmundur Adalsteinsson
76e6bacc80
Move string literal into variable
2020-05-16 13:22:52 +00:00
Gudmundur Adalsteinsson
6143343edf
Fix nodiscard warning
2020-05-16 13:20:48 +00:00
Gudmundur Adalsteinsson
6d71b9b541
Replace checks for C++17 with string view macro
2020-05-16 12:39:54 +00:00
Gudmundur Adalsteinsson
5a3dee082e
Problem: implicit conversion operators in context
...
Solution: add handle() and mark operators as deprecated
2020-05-15 20:38:05 +00:00
Gudmundur Adalsteinsson
4784b74c37
Problem: No endian check in encoding
...
Solution: Always write message part sizes
using network order.
2020-04-18 13:59:42 +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
Brett Viren
10431084bb
Problem: lack conversion message_t
and multipart_t
( #391 )
...
Solution: add encode/decode methods to multipart_t giving a codec compatible with the CZMQ equivalent.
2020-03-20 10:59:15 +01:00
Gudmundur Adalsteinsson
5999e5adc7
Problem: Macros not defined in older versions ( #386 )
...
* Problem: Macros not defined in older versions
Solution: Guard usage of libzmq macros
* Test older version of libzmq with C++11 or later
* Use a slightly newer libzmq version
2020-02-21 11:29:12 +01:00
Gudmundur Adalsteinsson
324b11f239
Problem: Context lacks typesafe options
...
Solution: Define an enum class for the context options
Co-Authored-By: Simon Giesecke <simon.giesecke@gmail.com>
Co-authored-by: Simon Giesecke <simon.giesecke@gmail.com>
2020-02-07 15:39:58 +01:00
Simon Giesecke
b6c79eb0c8
Reformat all files with clang-format
2020-01-28 11:11:31 +01:00
Gudmundur Adalsteinsson
47969cfdcf
Problem: shutdown() missing for context_t ( #377 )
...
Solution: Add shutdown(). This function is required
for clean termination of the zmq context in multi-threaded
applications where sockets are used in threads. In particular
if blocking operation are used and if sockets can be created
at any time.
* Improve tests and documentation
2020-01-27 08:31:46 +01:00
Gudmundur Adalsteinsson
4f9c2ea519
Problem: message_t to string is hard
...
Solution: add to_string() function.
2020-01-07 19:54:47 +00:00
Gudmundur Adalsteinsson
93e3090eb3
Problem: Missing recv multipart to fixed buffers
...
Solution: Add recv_multipart_n function
2019-12-05 20:02:38 +00:00
Gudmundur Adalsteinsson
76e5fb04a9
Problem: No multipart tests are begin run
...
Solution: Move ifdef
2019-11-09 12:40:02 +00:00
Gudmundur Adalsteinsson
41dee3e7a3
Remove comment, fix includes
2019-10-27 10:28:45 +00:00
Gudmundur Adalsteinsson
505edeb336
Problem: Handling multipart messages is complex
...
Solution: Add generic algorithms for sending and receiving multipart
messages.
2019-10-26 19:59:46 +00:00
Gudmundur Adalsteinsson
4b443fc59b
Clarify example requirements
2019-09-14 20:10:47 +00:00
Simon Giesecke
b2fa1192bd
Merge pull request #343 from gummif/gfa/str-buffer
...
Problem: Sending string literals is awkward
2019-09-13 09:40:08 +02:00
Gudmundur Adalsteinsson
7d9e5cb421
Add user-defined string literals to create buffers
2019-09-11 20:38:47 +00:00
Gudmundur Adalsteinsson
ab588fb7c9
Assertion and constexpr improvements for str_buffer
2019-09-11 20:21:02 +00:00
Gudmundur Adalsteinsson
57d3681ee4
Problem: Strict aliasing warning in tests
...
Solution: Use memcpy instead of reinterpret_cast
2019-09-10 20:13:45 +00:00