Commit Graph

154 Commits

Author SHA1 Message Date
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
Dave Meehan
79575b0dd9 Exclude MSVC SUO files regardless of where they are in the builds/msvc folder 2014-06-05 11:59:23 +01:00
Stoian Ivanov
6f5e7714cf test case for zmq_getsockopt/ZMQ_IDENTITY_FD 2014-05-13 15:19:48 +03:00
Daniel Shih
70b6516d96 add untracked test_stream_timeout into .gitignore and tests/Makefile.am 2014-05-11 23:46:51 +08:00
Pieter Hintjens
84ed81c014 Added test_metadata
- also prioritize ZAP metadata over ZMTP metadata in case application
  uses same names.
2014-05-02 22:21:50 +02:00
Frank
e5a294ec02 tweetnacl integration 2014-05-01 21:30:02 +02:00
Pieter Hintjens
cac0f9838d Problem: generates incompatible libzmq.so.3.1.0
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743508

The ABI in fact changed in two significant ways, one with inproc
connects, and one with socket monitoring

Solution: generate libzmq.so.4.0.0 library instead.

This change should be backported to zeromq-4.x
2014-05-01 16:12:51 +02:00
Richard Newton
26dc643205 Add delays in test_connect_rid to allow time for socket to close before address reuse. 2014-03-17 12:24:52 +00:00
Olaf Mandel
f1ba66a78b Update .gitignore to exclude *.exe under Cygwin 2014-02-14 14:37:45 +01:00
Pieter Hintjens
fa318400dc Fixed man page for zmq_proxy_hook
- spaces instead of tabs for indentation
- fixed levels under EXAMPLE USAGE
- added to Makefile.am
2014-01-29 15:15:29 +01:00
Pieter Hintjens
9c228e9374 Fixes to test cases
- renamed test_stream_disconnect_notifications (too long!)
- removed print statements in that test case
- fixed Makefile.am for test_zap_ipc_creds (was not building)
2014-01-23 09:23:46 -06:00
Pieter Hintjens
5bf96f64b0 Removed ZMQ_ZAP_IPC_CREDS option
- This seems redundant; is there a use case for NOT providing
  the IPC credentials to the ZAP authenticator?

- More, why is IPC authentication done via libzmq instead of ZAP?
  Is it because we're missing the transport type on the ZAP request?
2014-01-01 17:39:14 +01:00
Pieter Hintjens
bf3702395c Fixed wildcard IPC endpoint and added test case 2013-12-20 14:28:54 +01:00
Trevor Bernard
dfcf2950fc Add tests/test_zap_ipc_creds to .gitignore 2013-12-15 00:02:41 -04:00
Brandon Carpenter
2252322acc Add IPC accept filter socket options.
Adds ZMQ_IPC_ACCEPT_FILTER_{PID,UID,GID} socket options to add processs,
user, and group IDs to the IPC filter sets. Fixes LIBZMQ-568.
2013-12-04 14:23:13 -08:00
Chris Laws
a4385e6105 tidy up 2013-11-25 13:40:05 +10:30
Pieter Hintjens
7971ef3857 Added ignore test case 2013-11-09 12:27:21 +01:00
Pieter Hintjens
d7c8021afc Fixed issue 578 2013-11-04 15:39:20 +01:00
Pieter Hintjens
eaba5dfe37 Renamed test_router_raw_empty to test_stream_empty
* The ZMQ_ROUTER_RAW API was deprecated in favor of ZMQ_STREAM
* Same issue hit router.cpp, which I've fixed
2013-10-28 21:00:42 +01:00
Laurent Alebarde
5250bdab9f add tests/test_proxy in gitignore 2013-10-18 15:22:53 +02:00
Brandon Carpenter
62e26b3242 Add tests/test_abstract_ipc to .gitignore. 2013-10-07 10:55:40 -07:00
Pieter Hintjens
e42a0a4074 Added test case for issue 566
* Tests dealer-to-router connection 100 times
* This was failing in ZMQ v4.0.0 RC1
2013-09-26 14:18:40 +02:00
Matt Connolly
7b5da7dc09 git ignore test run output files: tests/test*.{log|trs} 2013-09-24 08:07:10 +10:00
Pieter Hintjens
5e609be345 Renamed new socket options to be clearer
* ZMQ_REQ_STRICT was negative option (default 1) which goes against
  the standard, where defaults are zero. I renamed this to
  ZMQ_REQ_RELAXED.

* ZMQ_REQ_REQUEST_IDS felt clumsy and describes the technical solution
  rather than the problem/requirement. I changed to ZMQ_REQ_CORRELATE
  which seems more explicit.
2013-09-20 15:30:04 +02:00
Pieter Hintjens
92c01f69db Renamed test_connect_delay to test_immediate
* The ZMQ_CONNECT_DELAY option was renamed to ZMQ_IMMEDIATE
2013-09-20 14:23:43 +02:00
Pieter Hintjens
e05556075f Renamed inproc connect test (name was too long) 2013-09-19 09:36:43 +02:00
Richard Newton
7c3496a76a Fix race condition and support multiple socket connects before bind. 2013-09-12 18:09:37 +01:00
Pieter Hintjens
ac8c72cea6 Added test_ctx_destroy to .gitignore 2013-09-12 12:47:14 +02:00
Pieter Hintjens
32fa426e61 Added system check at start of selftests
- tests that system can provide at least 1,000 sockets
- we could expand on this but this covers the main case of OS/X
  having a too-low default limit of 256 handles per process
2013-09-04 19:38:15 +02:00
Pieter Hintjens
fba5612026 Fixed 'make check' failures
- Split off NULL security check from PLAIN
- Cleaned up test_linger code a little
- Got all tests to pass, added TODOs for outstanding issues
- Added ZAP authentication for NULL test case
- NULL mechanism was not passing server identity - fixed
- cleaned up test_security_plain and removed option double-checks (made code ugly)
- lowered timeout on expect_bounce_fail to 150 msec to speed up checks
- removed all sleeps from test_fork and simplified code (it still passes :-)
2013-09-02 17:22:24 +02:00
Matt Connolly
0478ee04f4 Adding test showing failure to close socket/context in forked child 2013-09-01 20:42:10 +10:00
Christian Kamm
423ca36b17 Rename ZMQ_REQ_SEND_RESETS -> ZMQ_REQ_STRICT.
It defaults to enabled. Switch it off to be able to send a new message
before the previous reply has been received.
2013-08-03 14:35:18 +02:00
Christian Kamm
a0cc87a9d9 Add ZMQ_REQ_SEND_RESETS option.
This allows making a new request on a REQ socket by sending a new
message. Without the option set, calling send() after the first message
is done will continue to return an EFSM error.

It's useful for when a REQ is not getting a response. Previously that
meant creating a new socket or switching to DEALER.
2013-07-28 11:43:38 +02:00
Christian Kamm
b9646f2aac Add ZMQ_REQ_REQUEST_IDS option.
* Documentation:
The default behavior of REQ sockets is to rely on the ordering of messages
to match requests and responses and that is usually sufficient. When this option
is set to 1, the REQ socket will prefix outgoing messages with an extra frame
containing a request id. That means the full message is (request id, 0,
user frames...). The REQ socket will discard all incoming messages that don't
begin with these two frames.

* Behavior change: When a REQ socket gets an invalid reply, it used to
  discard the message and return EAGAIN. REQ sockets still discard
  invalid messages, but keep looking at the next one automatically
  until a good one is found or there are no more messages.
* Add test_req_request_ids.
2013-07-26 21:38:21 +02:00
Pieter Hintjens
9ca6898f24 Got new test cases working with libzmq
* disabled the specific tests that do not work (yet) on libzmq
* cleaned up one source (test_spec_rep.c) but the others need similar work
* added sleep in test_spec_rep to allow connects time to happen; this would
  not be needed if we connected out to the REP peers instead in from them,
  but I didn't want to change the logic of the test code.
2013-07-07 12:49:24 +02:00
Pieter Hintjens
ad77937956 Added ZMQ_STREAM socket type
- designed for TCP clients and servers
- added HTTP client / server example in tests/test_stream.cpp
- same as ZMQ_ROUTER + ZMQ_ROUTER_RAW + ZMQ_ROUTER_MANDATORY
- includes b893ce set ZMQ_IDENTITY on outgoing connect
- deprecates ZMQ_ROUTER_RAW
2013-06-27 20:53:15 +02:00
Ian Barber
1fe7820629 Merge pull request #577 from hintjens/master
API for CURVE configuration
2013-06-20 11:09:20 -07:00
Gonzalo Diethelm
3b355fec9a Introduced private constants for the context sanity tag values.
Ignored more MSVC intermmediate files.
2013-06-20 12:43:32 -04:00
Pieter Hintjens
d9bb16725e Added options for CURVE security
- ZMQ_CURVE_PUBLICKEY for clients and servers
- ZMQ_CURVE_SECRETKEY for clients
- ZMQ_CURVE_SERVERKEY for clients
- ZMQ_CURVE_SERVER for servers
- added tools/curve_keygen.c as example
- updated man pages
2013-06-20 18:09:12 +02:00
Pieter Hintjens
a9679da764 Packaging on ZMQ_PROBE_ROUTER
- renamed to ZMQ_PROBE_ROUTER
2013-06-05 15:55:15 +02:00
Pieter Hintjens
2344131db3 Packaging of ZMQ_PROBE
- Cleaned up man page a little
- Wrote test case tests/test_router_probe.cpp
2013-06-05 15:29:40 +02:00
Pieter Hintjens
e1f797b048 Added configuration for PLAIN security
* ZMQ_PLAIN_SERVER, ZMQ_PLAIN_USERNAME, ZMQ_PLAIN_PASSWORD options
* Man page changes to zmq_setsockopt and zmq_getsockopt
* Man pages for ZMQ_NULL, ZMQ_PLAIN, and ZMQ_CURVE
* Test program test_security
2013-05-15 17:55:21 +02:00
Pieter Hintjens
cb2ee7a5c2 Fixed up test_iov case 2013-04-27 14:53:14 +02:00
Sebastien Rombauts
0ecc96bf33 Adding missing new ZeroMQ_Static.props and Static.props files
+ ignore StaticRelease & StaticDebug intermediate files
2013-02-24 16:17:20 +01:00
Pieter Hintjens
8ab3c4a1bf Fixed issue #500 2013-01-31 21:52:30 +01:00
Pieter Hintjens
aa21e090e1 Updated .gitignore 2013-01-30 22:24:59 +01:00
o172(xenovo)
0a1bd45721 Added tests/test_disconnect_inproc to .gitignore 2013-01-23 19:20:52 +00:00
Pieter Hintjens
79da450b8b Fixed formatting in man page 2012-10-31 04:35:15 +01:00
Pieter Hintjens
983ee761b1 Renamed ZMQ_ROUTER_BEHAVIOR to ZMQ_ROUTER_MANDATORY for clarity 2012-10-08 16:36:35 +09:00
Pieter Hintjens
8d96a43975 Fixed documentation of HWM on ZMQ_PULL 2012-07-04 17:46:08 +09:00
Ian Barber
e5904e63ce Allow blocking while connect() is completing
This patch, salvaged from a trainwreck accidental merge earlier, adds a
new sockopt, ZMQ_DELAY_ATTACH_ON_CONNECT which prevents a end point
being available to push messages to until it has fully connected, making
connect work more like bind. This also applies to reconnecting sockets,
which may cause message loss of in-queue messages, so it is sensible to
use this in conjunction with a low HWM and potentially an alternative
acknowledgement path.

Notes on most of the individual commits can be found the repository log.
2012-06-12 15:34:48 +01:00
Ian Barber
95cbad3841 Revert "After speaking with Ben Gray and the discussion on the mailing list, this is an attempt to create a sockopt to allow connecting pipes to not immediately be available for traffic. The problem is in a PUSH to many PULL situation, where there is a connect to a PULL which is not there. This connect will immediately create a pipe (unlike bind), and traffic will be load balanced to that pipe. This means if there is a persistently unavailable end point then the traffic will queue until HWM is hit, and older messages will be lost."
This reverts commit fe3fb419fe.
2012-06-12 14:53:57 +01:00
Ian Barber
fe3fb419fe After speaking with Ben Gray and the discussion on the mailing list, this is an attempt to create a sockopt to allow connecting pipes to not immediately be available for traffic. The problem is in a PUSH to many PULL situation, where there is a connect to a PULL which is not there. This connect will immediately create a pipe (unlike bind), and traffic will be load balanced to that pipe. This means if there is a persistently unavailable end point then the traffic will queue until HWM is hit, and older messages will be lost.
This patch adds a sockopt ZMQ_DELAY_ATTACH_ON_CONNECT, which if set to 1 will attempt to preempt this behavior. It does this by extending the use of the session_base to include in the outbound as well as the inbound pipe, and only associates the pipe with the socket once it receives the connected callback via a process_attach message. This works, and a test has been added to show so, but may introduce unexpected complications. The shutdown logic in this class has become marginally more awkward because of this, requiring the session to serve as the sink for both pipes if shutdown occurs with a still-connecting pipe in place. It is also possible there could be issues around flushing the messages, but as I could not directly think how to create such an issue I have not written any code with regards to that.

The documentation has been updated to reflect the change, but please do check over the code and test and review.
2012-06-01 17:58:19 +01:00
Lourens Naudé
d0461752ff Merge branch 'master' into events 2012-05-11 22:08:17 +01:00
Ian Barber
e65d228f4f gitignore endpoint test and add docs for unbind and disconnect 2012-05-11 14:17:45 +01:00
Lourens Naudé
5c6f72c17c ZMQ_MONITOR socket option registers a callback / event sink for changes in socket state 2012-05-04 02:32:46 +01:00
Pieter Hintjens
f26e4ab784 Simplified zmq_msg_get/set functions
* Return integer property
* Fixed up man pages, which were inaccurate
* Fixed test case
2012-03-21 14:19:40 -05:00
Pieter Hintjens
ccdb7a6305 Minor cleanups
* Fixed use of ssize_t in zmq_msg_t class
* Corrected error after merge, old reference to inner_fctname (broke build)
2012-02-16 15:55:18 -06:00
Pieter Hintjens
bd4f703264 Ignored generated files 2012-02-15 09:27:42 -06:00
Stuart Webster
3fb5c11b03 Added MSVC10 solution and project files for Windows
These include configurations for both Win32 and x64 platforms. All project
settings have been normalised in property sheets (the ".props" files under
builds/msvc/properties) to simplify maintenance. Build artefacts are all
generated in platform-specific subfolders of bin, lib and obj directories.

Also enables the use of precompiled headers with MSVC10.

This significantly reduces the time required to compile libzmq with Visual
Studio on Windows. It should have no impact on other platforms.

Signed-off-by: Stuart Webster <sw_webster@hotmail.com>
2011-12-15 14:03:43 +01:00
Stuart Webster
a610b3d1b4 Line-ending conversion rules for hg-git users and enabled use of .gitignore by hg-git users
Mercurial does not have built-in support for converting line-endings. This is a
settings file for hg eol (http://mercurial.selenic.com/wiki/EolExtension), an
extension that replicates the behaviour of git with core.autocrlf=true.

Mercurial uses Python regex syntax by default in its .hgignore files. Adding
this line to .gitignore overrides that setting, so hg-git users can just create
a hardlink to it (e.g "mklink /H .hgignore .gitignore" on Windows) to use it.

Signed-off-by: Stuart Webster <sw_webster@hotmail.com>
2011-11-19 10:02:23 +01:00
Chuck Remes
93529d8c5d Add zmq_getmsgopt to the API
The new function allows to retrieve options (flags)
from zmq_msg_t.

Signed-off-by: Chuck Remes <cremes@mac.com>
Renamed from zmq_msg_flags to zmq_getmsgopt
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-06 14:03:51 +01:00
Martin Sustrik
42737f0918 test_invlid_rep added to .gitignore
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-14 14:24:59 +02:00
Martin Sustrik
258e7e6794 Code cleanup
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-26 20:13:54 +02:00
Martin Sustrik
9906c652ca Outdated entries removed from .gitignore
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-26 12:21:49 +02:00
Martin Sustrik
ec81f8fb25 New wire format for REQ/REP pattern
This patch introduces two changes:
1. 32-bit ID is used to identify the peer instead of UUID
2. REQ socket seeds the label stack with unique 32-bit request ID
   It also drops any replies with non-matching request ID

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-22 11:02:16 +02:00
Fabien Ninoles
d7923f08ca Add sockopt ZMQ_RCVTIMEO/ZMQ_SNDTIMEO.
- Add doc and tests
- Add options and setup
- Wait using poll/select

Signed-off-by: Fabien Ninoles <fabien@tzone.org>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-17 12:22:02 +02:00
Martin Sustrik
54ea458f62 Git ignores .gcno files
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-03 07:36:02 +02:00
Martin Sustrik
ae90d3bdbe inproc_lat and inproc_thr added to .gitignore
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-01 11:55:10 +02:00
Mikko Koppanen
fbf1f51468 Upstream the openpgm build fixes. Add DSO symbol visibility to OpenPGM builds
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-03-31 18:42:09 +02:00
Martin Sustrik
c8e5be87d8 test-hwm added to .gitignore
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-05 15:04:15 +01:00
Martin Sustrik
0bc2a05d84 .gitignore modified to ignore test executables
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-11-27 12:51:43 +01:00
Martin Lucina
eb83678b2b Add INSTALL to Git, thus making it a normal file
INSTALL gets added in somewhat magically by automake, or not. Adding it into
Git ensures it's always included in the distribution.

Signed-off-by: Martin Lucina <mato@kotelna.sk>
2010-11-01 14:12:33 +01:00
Gonzalo Diethelm
26d7669464 Added bin directory to ignore list. 2010-10-14 08:02:43 -03:00
Martin Lucina
1e8451961e Update .gitignore 2010-09-04 17:44:11 +02:00
Martin Sustrik
ad75d02134 Add MSVC build files to distribution 2010-03-16 15:48:16 +01:00
Martin Lucina
10bbe6af99 Cleanup .gitignore 2010-03-11 20:43:51 +01:00
Martin Sustrik
deda7ca54a Java Poller patch 2010-02-26 17:28:09 +01:00
Martin Lucina
39b8961974 Update OpenPGM to 2.0.24 (stable) 2010-02-24 09:41:10 +01:00
Martin Sustrik
025c9e173c execution disabled on certain source files; some comments on java binding; MSVC temp files added to .gitignore 2010-02-23 17:22:52 +01:00
Martin Sustrik
a2f9899f6a missing COPYING file added 2010-02-16 17:50:36 +01:00
Martin Lucina
b09eeeb2fa Update gitignore 2010-02-15 23:52:08 +01:00
Martin Lucina
354efc513f Convert documentation to AsciiDoc 2010-02-10 16:18:46 +01:00
Martin Sustrik
f17f0fa67b CL binding ripped out of the tree 2010-01-28 12:45:12 +01:00
Martin Sustrik
4ceb839350 typos in man pages fixed 2010-01-18 13:16:14 +01:00