Commit Graph

675 Commits

Author SHA1 Message Date
Pawel Kurdybacha
8d84f9a1af Problem: cmake already pre-installed on OSX
Solution: do not try to install cmake on OSX and add clang as used
compiler explicitly
2018-05-13 16:57:24 +01:00
Pawel Kurdybacha
6cd57fad17 Problem: not all cores used on Travis
Solution: As Travis enables 2 cores let's use them both
2018-05-13 16:57:24 +01:00
Pawel Kurdybacha
3807107f56 Problem: coveralls does not install on OSX
Solution: enable coverall on linux only.
2018-05-13 16:57:24 +01:00
Pawel Kurdybacha
4311d1d933 Problem: enabled sudo for travis build
After previous changes `sudo` is not required anymore.
Solution: disable sudo.
2018-05-13 16:57:24 +01:00
Pawel Kurdybacha
0fd3e165f3 Problem: OSX build does not start first.
Solution: remove matrix and include build combination manually.
2018-05-13 16:05:13 +01:00
Pawel Kurdybacha
1fc0675a83 Problme: OSX build does not use clang
Default compiler on OSX is clang so it should be default.
Solution: switch from gcc to clang for OSX build.
2018-05-13 15:55:10 +01:00
Pawel Kurdybacha
738d44dc88 Problem: OSX build not enabled
Solution: Enable OSX build with DRAFT and latest libzmq
2018-05-13 15:44:46 +01:00
Pawel Kurdybacha
21350a3fd3 Problem: Only one version of libzmq tested
Solution: use libzmq 4.2.4, last two releases in use now.
2018-05-13 15:30:56 +01:00
Pawel Kurdybacha
a5578a6f25 Problem: libzmq 4.2.0 cmake build broken
It seems that there is a bug in libzmq 4.2.0 cmake configs that prevents
linking to it without installing.

Solution: disable libzmq 4.2.0 for cmake builds
2018-05-13 15:30:56 +01:00
Pawel Kurdybacha
3dc20bb05a Problem: libzmq builds with tests
libzmq build with default settings now which build all the tests and
performance tools. This is not required for cppzmq build and slows down
it only.

Solution: disable tests build for libzmq and make it release only.
2018-05-13 15:30:56 +01:00
Pawel Kurdybacha
f35cbe2930 Problem: libzmq installed during build
There is no need to install libzmq into the system.
Out of source build can be used later to build cppzmq.

Solution: remove install steps and rely more on cmake to handle
directory creation.
2018-05-12 18:28:19 +01:00
Luca Boccassi
f81accd6b1
Merge pull request #228 from kurdybacha/clang-format
Problem: whitespace style too restrictive.
2018-05-12 17:37:56 +01: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
Luca Boccassi
590cf711e5
Merge pull request #227 from sigiesec/poller-wait-all-return-sizet
Problem: poller_t::wait_all and active_poller_t::wait declare int ret…
2018-05-12 11:31:15 +01:00
Giesecke
65ae6b33fd Problem: poller_t::wait_all and active_poller_t::wait declare int return type but actually return an element count
Solution: change return type to size_t, remove a redundant if in consequence
2018-05-12 09:18:46 +02:00
Simon Giesecke
bc82352c95
Merge pull request #226 from kurdybacha/clang-format
Problem: inconsistent code style
2018-05-11 23:21:45 +02:00
Pawel Kurdybacha
cd72eef3fd Problem: zmq_addon.hpp not follow clang-format 2018-05-11 20:32:23 +01:00
Pawel Kurdybacha
5031278f18 Problem: project files do not follow clang-format 2018-05-11 20:29:15 +01:00
Pawel Kurdybacha
7732903177 Problem: trailing whitespaces in clang-format file 2018-05-11 20:08:26 +01:00
Pawel Kurdybacha
85f759a170 Problem: inconsistent code style
Solution: copy .clang-format from `libzmq` as a starting point.

There is no need to follow exactly what libzmq does but it seems
reasonable starting point. It would be good to stick to one style as
there is a lot of activity and good ideas lately.
2018-05-11 20:03:15 +01:00
Luca Boccassi
0f840ce3f8
Merge pull request #225 from sigiesec/split-poller-layer
Split poller_t into two layers
2018-05-11 13:56:16 +01:00
Luca Boccassi
fffd7bfd47
Merge pull request #224 from sigiesec/add-design-goals
Problem: design goals and supported platforms are not explicitly stated
2018-05-11 13:26:47 +01:00
Simon Giesecke
2c2915a3ea Problem: design goals and supported platforms are not explicitly stated
Solution: add section on design goals and supported platforms to README, improve overall structure of README
2018-05-11 14:09:11 +02:00
Simon Giesecke
421d66c97e Problem: redundant assertion
Solution: removed redundant assertion
2018-05-11 12:31:17 +02:00
Simon Giesecke
762b0131e8 Problem: no tests for poller_t
Solution: add tests
2018-05-11 12:31:17 +02:00
Simon Giesecke
3251d05636 Problem: creation of poller_events is unnecessarily complex
Solution: simplify code
2018-05-11 11:35:11 +02:00
Simon Giesecke
f700e5d6b0 Problem: deprecation warning in multipart_t
Solution: use non-deprecated operator!= instead
2018-05-11 11:33:54 +02:00
Simon Giesecke
ee1cc9a791 Problem: unnecessary heap allocations for test subject
Solution: change to local variables
2018-05-11 11:33:54 +02:00
Simon Giesecke
882f5e844c Problem: extra abstraction layer type poller_t is in zmq.hpp
Solution: move to zmq_addon.hpp, rename to active_poller_t, and rename base_poller_t to poller_t
2018-05-11 11:33:53 +02:00
Simon Giesecke
dc996cd2ec Problem: zmq_addon header contains tests (with a syntax error)
Solution: convert to googletest based test, and fix syntax error
2018-05-11 11:33:53 +02:00
Simon Giesecke
89d9db7366 Problem: move poller tests are unspecific
Solution: remove redundant assertions (tested elsewhere), and add assertion behaviour of calling wait on moved-from poller
2018-05-11 11:02:59 +02:00
Simon Giesecke
bf47be0a0c Problem: poller_t adds an abstraction layer on zmq_poller_*
Solution: extract base_poller_t from poller_t, which provides a direct mapping of zmq_poller_* to C++ only
2018-05-11 11:02:27 +02:00
Simon Giesecke
cdef8bc069
Merge pull request #222 from kurdybacha/poller-init
Problem: poller's constructor is not default generated
2018-05-11 08:12:52 +02:00
Simon Giesecke
e972f39c93
Merge pull request #223 from kurdybacha/server-client
Problem: client/server socket types not defined.
2018-05-11 08:11:30 +02:00
Pawel Kurdybacha
33025bf0e6 Problem: client/server socket types not defined.
Solution: Add ZMQ_CLIENT and ZMQ_SERVER to socket_type enum.
Update some of draft guarded unit tests to use them.
2018-05-11 06:41:53 +01:00
Pawel Kurdybacha
c03fb35173 Problem: poller's constructor is not default
Solution: Constructor logic moved to the same place where cleanup is and
marking constructor `default`. Init/cleanup code is in one pleace making
it easier to read/maintain.
2018-05-11 05:56:07 +01:00
Simon Giesecke
2aba0bb3ac
Merge pull request #221 from kurdybacha/poller-size
Problem: poller move operations not complete
2018-05-09 09:05:48 +02:00
Pawel Kurdybacha
625a0ebb41 Unit tests for poller's move operations 2018-05-09 05:57:44 +01:00
Pawel Kurdybacha
559d373da3 Add back size method, add empty for completeness
As disscussed on #219 PR bringing back `size` method and adding `empty`
for completeness.
2018-05-09 05:44:11 +01:00
Pawel Kurdybacha
4dde37e7b2 Make poller default movable
Latest modification to the poller made move constructor and move
assigment operator not complete. In order to prevent that in the future
poller should be default movable. Unique pointer has been used to
manager zmq_poller. That makes code simpler and safer now.
2018-05-08 21:56:15 +01:00
Luca Boccassi
3281509eda
Merge pull request #220 from zguangyu/patch-1
Fix message using empty version variable
2018-05-08 19:50:23 +01:00
Guangyu Zhang
cfe3bafc1f
Fix message using empty version variable 2018-05-08 09:34:35 -04:00
Pawel Kurdybacha
faf6671d38 Problem: poller can segfault when modified from registered handler. (#219)
* Problem: poller can segfault when modified from registred handler.

It is possible that a user would like to add/remove sockets from
handlers. As handlers and poll items might be removed while not
being processed yet - we have a segfault situation.
Provided unit test `remove_from_handler` demonstrates the problem.

Solution: Modify internal poll item data structure only after processing
of events is finished.

Please not that events processing path performance remains the same when there are
no modification (add/remove) to the poller (no rebuild) - main real use case.

As an effect of changes `size()` method has been removed as it does not
represent any meaningful information anymore. There are active and pending
(waiting for rebuild) poll items so two different sizes. User can
easily track on their side number of registered sockets if original size
information is needed.

`wait` method returns number of processed sockets now. It might be
useful information to a user for no extra cost.
2018-05-03 21:10:05 +01:00
Luca Boccassi
ac64eba5c6
Merge pull request #218 from kleisauke/patch-3
Problem: Missing QUIET option causes a CMake warning
2018-05-02 14:43:54 +01:00
Kleis Auke Wolthuizen
7d8e3ab473 Problem: Missing QUIET option causes a CMake warning
When libzmq is installed via a package manager, it causes a CMake warning when building cppzmq, which can be safely ignored.
2018-05-02 15:24:30 +02:00
Constantin Rack
13bf7fdb2c
Merge pull request #217 from kurdybacha/cmake_install
Problem: googletest is also installed into install destination
2018-04-29 14:09:13 +02:00
Pawel Kurdybacha
131d2ec487 Problem: googletest is also installed into install destination
Building and installing cppzmq brings googletest build artifacts to the
installation destination as well. For example someone building cppzmq
with:
```
cmake -DCMAKE_INSTALL_PREFIX=mydest .
cmake --build --target install
```
gets googletest headers and libraries in `mydest`.

Solution: remove googletest from install target
2018-04-29 12:57:32 +01:00
Luca Boccassi
99b9967970
Merge pull request #216 from kurdybacha/deprecated_draft
Problem: deprecated poller's add method in draft API
2018-04-26 20:05:02 +01:00
Pawel Kurdybacha
94e0fb0bc3 Problem: deprecated poller's method in draft API
We have a deprecated method `add` in poller that contradicts purpose of a draft
API where it can change without deprecation period.

Solution: remove the method so we do not to maintain it anymore.
2018-04-26 19:50:14 +01:00
Luca Boccassi
17e1d97044
Merge pull request #215 from kurdybacha/poller_modify
Problem: poller_t does not support modify
2018-04-24 21:46:30 +01:00