0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-26 23:01:04 +08:00

138 Commits

Author SHA1 Message Date
Ilya Kulakov
656cdb959a Problem: Race condition in IPC sockets
Solution: Don't unlink file on close

File may not belong to the socket at that point.
2017-10-05 14:57:10 -07: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
Luca Boccassi
272d340c1f Problem: no mixed FD and zmq socket zmq_poll test
Solution: add one
2016-12-15 12:03:48 +00:00
Luca Boccassi
25402335fd Problem: no bind-after-connect TCP test
Solution: add one to increase coverage
2016-09-24 18:27:19 +01:00
Luca Boccassi
0372e5ce22 Problem: spec file needs version before build on OBS
Solution: stop autogenerating it and hard code version so that the
OBS build service can extract it and use it to build packages
automatically
2016-07-31 17:10:33 +01:00
Fedor Sheremetyev
219f2ffa46 Add missing Git ignores. 2016-06-20 13:58:23 +01:00
somdoron
d58eb54581 problem: test_dgram is missing in .gitignore 2016-05-16 12:19:38 +03:00
hitstergtd
206771afd2 Problem: Not all ancillary API methods tested
Solution:
- Add file for testing ancillary API methods and any misc internal machinery
- Add tests for zmq_version(3) and zmq_strerror(3)
- Add test file into gitignore, Autotools and CMake build files
- Increase test coverage

Note:
MSVC solution files have not been updated.
2016-05-08 18:25:03 +01:00
hitstergtd
e68c8ae1eb Problem: Not all GCOV extensions in .gitignore
Solution:
Fix it.
2016-05-03 11:38:25 +01:00
Luca Boccassi
b741350745 Problem: test_pub_invert_matching not ignored
Solution: add it to .gitignore
2016-05-02 22:51:30 +01:00
hitstergtd
f950f2ba69 Problem: No default doxygen cfg for ZeroMQ project
Solution:
- Add Doxygen.cfg file to make it simpler for library users and interested
parties to view library internals/externals
- Add README.doxygen.md as an Overview for Doxygen-generated documentation

Notes:
This could later be added into CI for autogenerated documentation that could be
posted to the gh-pages branch.
2016-04-28 14:14:38 +01:00
somdoron
e6dae56c6e Scatter-Gather socket types 2016-04-21 14:50:58 +03:00
Matt Powley
260860dea1 Add .gitignore for Visual Studio builds in the 'builds/msvc' folder
* Added a new .gitignore file for excluding Visual Studio build output any popular plug-in generated content. (This was copied from the GitHub project https://github.com/github/gitignore).
* Removed the basic ignore settings from the root folder in favour of more precision within the subfolder's .gitignore file
* Added the new VC compiler's experimental Intellisense database file
2016-03-31 14:51:36 +01:00
Luca Boccassi
15fd419f22 Problem: test_large_msg requires 2GB of free RAM
Solution: remove temporarily until proper message limits have been
implemented, then a more granular test case can be added without
such high requirements which are problematic in embedded environment,
build systems, VMs and CI systems
2016-03-16 21:47:58 +00:00
Luca Boccassi
b3b9cfd92e Problem: packaging/redhat/zeromq.spec not ignored
Solution: add it to .gitignore
2016-02-22 11:59:51 +00:00
Pieter Hintjens
7129187f87 Problem: getting various warnings in tweetnacl
libzmq used to switch off pedantic checks when using tweetnacl. As
this is now the default, that means pedantic checks are always off.
This is not good.

Solution: in tweetnacl.c alone, use a GCC pragma to disable sign
comparison warnings. We could also clean the code up yet this is
simpler. In other code, we still want those warnings, hence I've
used a pragma rather than global compile option.

Second, use -Wno-long-long all the time, as this warning does not
work with a pragma.

I removed code that set -wno-long-long, for MinGW and Solaris.

Related problem 2: --with-relaxed is badly named

This option switches off pedantic checks, so should be called
--disable-pedantic. 'with' is for optional packages.
2016-02-17 12:06:45 +01:00
Pieter Hintjens
9bebd4dce9 Problem: local build should do its own .gitignore
Solution: add .gitignore in builds/gyp
2016-02-17 12:06:45 +01:00
Luca Boccassi
63a0924484 Problem: test_sockopt_hwm not renamed in gitignore
Solution: rename from test_socketopt_hwm to test_sockopt_hwm in
.gitignore too
2016-02-13 18:01:03 +00:00
Constantin Rack
22e830bece Merge pull request #1798 from hintjens/master
Getting gyp build working
2016-02-12 10:07:14 +01:00
Pieter Hintjens
6bef3fe9ad Problem: can't build libzmq.a using gyp
Solution: add necessary macros into builds/gyp/platform.hpp

Work for Linux now, other platforms to test.
2016-02-12 09:58:44 +01:00
Pieter Hintjens
fde81d7e07 Problem: can't build using gyp
I'm adding gyp support so that we can easily pull in libzmq
and other C/C++ projects into gyp packages, especially via
node-gyp.

Solution: add gyp definition

This works only for Windows, OS/X, and Linux. We set a single
macro in project.gyp according to the system, and the rest is
done in builds/gyp/platform.hpp. The values in that file are
not dynamic. Your mileage will vary.
2016-02-11 22:41:01 +01:00
Luca Boccassi
2e3a0db5f9 Problem: old filenames in .gitignore
Solution: remove them
2016-02-11 15:29:14 +00:00
Pieter Hintjens
b49a60410a Problem: use of libsodium vs. tweetnacl is confused
It's unclear which we need and in the source code, conditional code
treats tweetnacl as a subclass of libsodium, which is inaccurate.

Solution: redesign the configure/cmake API for this:

* tweetnacl is present by default and cannot be enabled
* libsodium can be enabled using --with-libsodium, which replaces
  the built-in tweetnacl
* CURVE encryption can be disabled entirely using --enable-curve=no

The macros we define in platform.hpp are:

    ZMQ_HAVE_CURVE    1        //  When CURVE is enabled
    HAVE_LIBSODIUM    1        //  When we are using libsodium
    HAVE_TWEETNACL    1        //  When we're using tweetnacl (default)

As of this patch, the default build of libzmq always has CURVE
security, and always uses tweetnacl.
2016-02-11 13:32:01 +01:00
Luca Boccassi
edc4ee03e8 Problem: ZMQ_USEFD does not follow conventions
Solution: rename socket option (and variables and files) from usefd
to use_fd.
2016-02-09 09:36:14 +00:00
Luca Boccassi
c158178798 Problem: ZMQ_PRE_ALLOCATED_FD is too long
Solution: rename socket option (and variables and files) from
pre_allocated_fd to usefd.
2016-02-08 22:46:34 +00:00
Pieter Hintjens
c5bf0dc0a4 Merge pull request #1770 from bluca/systemd
Problem: no support for pre-allocated file descriptors [systemd | upstart socket-based activation]
2016-02-04 18:51:28 +01:00
Luca Boccassi
84ad4bf0ff Problem: cannot use new pre-allocated FD with TCP
Solution: parse the value set by the ZMQ_PRE_ALLOCATED_FD sockopt
when creating a new TCP socket and use it if valid.
Add new tests/test_pre_allocated_fd_tcp.cpp unit test.
2016-02-04 16:57:26 +00:00
Luca Boccassi
9b885b7c00 Problem: cannot use new pre-allocated FD with IPC
Solution: parse the value set by the ZMQ_PRE_ALLOCATED_FD sockopt
when creating a new IPC socket and use it if valid.
Add new tests/test_pre_allocated_fd_ipc.cpp unit test.
2016-02-04 16:57:26 +00:00
Pieter Hintjens
984699c427 Problem: was ignoring directories with build files
Solution: fix .gitignore
2016-02-03 21:13:54 +01:00
somdoron
5ebfd1728f make udp support for radio-dish 2016-01-29 21:17:11 +02:00
somdoron
b8425a25cf radio-dish pattern 2016-01-27 18:22:48 +02:00
Pieter Hintjens
d8d9ee3243 Problem: no support for OpenWRT
Solution: copy ZeroMQ packaging script from
https://github.com/vperron/openwrt-zmq-packages

Note: this is not usable as-such, needs fixing.
2016-01-15 10:10:06 +01:00
Constantin Rack
c19470ece1 Merge pull request #1675 from somdoron/Timers
Problem: no way to schedule timers with zmq_poll or zmq_poller
2015-12-18 11:34:39 +01:00
somdoron
aadaf99011 add timers API to libzmq 2015-12-18 12:23:22 +02:00
Pieter Hintjens
f3bcb73f02 Fixed old path to qt-android 2015-12-17 16:24:35 +01:00
Constantin Rack
5ba328d7f3 Problem: there is no test for setsockopt ZMQ_TCP_SEND/RECV_BUFFER
Solution: add test case
2015-11-13 10:44:00 +01:00
somdoron
6501b8089f port zpoller to libzmq as zmq_poller 2015-10-18 21:07:23 +03:00
somdoron
1653d3c093 add new tests to gitignore 2015-08-16 13:57:28 +03:00
Dylan Cali
ee787664bb ignore unbind tests 2015-06-29 03:19:24 -05:00
Dylan Cali
34129593f0 update gitignore with additional tests 2015-06-28 21:13:02 -05:00
Rik van der Heijden
7b9e9b838d Issue #1382: Do not send data to backend when there are no listeners (+ tests) 2015-05-01 10:39:29 +02:00
Thomas Rodgers
fefe0d42fa Update gitignore to include recently added tests for server sockets 2015-02-18 12:30:05 -06:00
Thomas Rodgers
7d224d7871 Add 'Peer-Address' property to connection metadata
Allows non-C/C++ based clients easy access to the peer's IP address via
zmq_msg_gets(&msg, "Peer-Address") instead of zmq_msg_get(&msg, ZMQ_SRCFD)
followed by calls to getpeername and getnameinfo
2015-01-16 14:52:16 -06:00
Pieter Hintjens
2de940b422 Problem: need atomic reference counting in several projects
Solution: as libzmq already provides this across all platforms,
expose an atomic counter API. I've not wrapped atomic pointers,
though someone who needs this may want to do so.
2014-12-23 01:14:38 +01:00
Pieter Hintjens
be55c5ac3d Fixed .gitignore for mains in root 2014-11-03 17:28:18 +01:00
Joe McIlvain
eae679718e Problem: No builtin way to build for qt-android
Solution: Add qt-android build system and add to travis-ci
2014-11-02 17:33:23 -08:00
evoskuil
a8e900c7b3 Update nuget package 2014-09-11 17:31:48 -07:00
evoskuil
2208907a88 Hide VS turd. 2014-08-28 18:21:51 -07:00
Pieter Hintjens
2584c3a724 Added test cases to .gitignore 2014-08-27 12:06:54 +02:00
Pieter Hintjens
f11d673ba9 Problem: need way to probe library capabilities
As libzmq is compiled with optional transports and security mechanisms,
there is no clean way for applications to determine what capabilities
are actually available in a given libzmq instance.

Solution: provide an API specifically for capability reporting. The
zmq_has () method is meant to be open ended. It accepts a string so
that we can add arbitrary capabilities without breaking existing
applications.

zmq.h also defines ZMQ_HAS_CAPABILITIES when this method is provided.
2014-06-18 15:19:07 +02:00