Commit Graph

133 Commits

Author SHA1 Message Date
Martin Hurton
2928c91a6d Implement ZAP and integrate it with PLAIN mechanism 2013-06-06 13:28:21 +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
c7c865da75 Whitespace fixes 2013-05-21 18:52:44 +02:00
Pieter Hintjens
f06abca046 Disable failing test for now 2013-05-17 17:26:54 +01:00
Pieter Hintjens
f909b9c722 plain_mechanism now uses options.as_server
- we need to switch to PLAIN according to options.mechanism
- we need to catch case when both peers are as-server (or neither is)
- and to use username/password from options, for client
2013-05-17 17:21:59 +01:00
Pieter Hintjens
da1e9a178a Cleaned up test pingpong code 2013-05-17 17:20:33 +01: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
Martin Hurton
a7032e9ca8 Update test_raw_sock to work with ZMTP/3.0 2013-04-28 14:13:40 +02:00
Pieter Hintjens
cb2ee7a5c2 Fixed up test_iov case 2013-04-27 14:53:14 +02:00
Jon Dyte
56ead84490 Experimental function zmq_recviov doesnt work correctly in a couple of cases
1) VSM - you cannot hand out the 'data' address as it was not allocated on the heap
2) for other messages the 'data' address cannot be handed out either, as it not the address
originally returned by malloc and hence cannot be passed to 'free'.
see msg.cpp
u.lmsg.content = (content_t*) malloc (sizeof (content_t) + size_);
....
u.lmsg.content->data = u.lmsg.content + 1;

So the function is changed to always malloc a data buffer and copy the data into it.
There is a possible optimisation using memmove for the non-VSM case but that is not done yet.
2013-04-25 21:58:26 +01:00
Pieter Hintjens
257debf659 Removed IPC endpoint from test; not portable, and fragile (#80) 2013-03-24 15:12:34 +01:00
Pieter Hintjens
f1738b9b92 More copyright cleanups 2013-03-12 17:04:51 +01:00
Pieter Hintjens
d826c53b9b Bumped ZMTP revision to 2
* Starting draft ZMTP/2.1 protocol (revision 2)
* Basis for adding security to the wire protocol
* Maintains backward compatibility
2013-03-12 15:49:23 +01:00
Pieter Hintjens
785ef41f67 Refactored codecs to match ZMTP version numbers 2013-03-12 15:29:37 +01:00
Guido Goldstein
b0b8ab27c5 Changed message structure for event notifications. 2013-03-08 13:48:18 +01:00
Guido Goldstein
21eeb03b6c Simplified the zmq_event_t structure for easier access and better usability towards language bindings. 2013-03-08 10:34:25 +01:00
Pieter Hintjens
51cfcb117a Some DNSs will resolve ANY domain name so I made more reliable errors. 2013-02-10 08:39:27 +01:00
montoyaedu
1a13554fe0 solved broken tests compilation 2013-02-07 12:27:33 +01:00
Pieter Hintjens
8ab3c4a1bf Fixed issue #500 2013-01-31 21:52:30 +01:00
Pieter Hintjens
963c6a8e2f Lots of cleanups to self-tests
* Removed or truncated sleeps so the tests run faster
* Removed dependencies on zmq_utils
* Rewrote a few tests that were confusing
* Minor code cleanups
2013-01-31 19:46:22 +01:00
Pieter Hintjens
c39cb0bde1 Rewrote completely, was bogusly testing EAGAIN 2013-01-31 16:26:28 +01:00
Pieter Hintjens
3a558fcc4b Rewrote raw test completely 2013-01-31 15:00:17 +01:00
Pieter Hintjens
8c9289342a Fixed use of deprecated zmq_init/term 2013-01-31 09:10:49 +01:00
Pieter Hintjens
5f009e5234 Various cleanups to test programs 2013-01-30 23:53:23 +01:00
MinRK
edd43e1ca4 deprecate zmq_ctx_destroy in favor of zmq_ctx_term
in order to avoid logical collisions with pre-existing notions of context destruction in bindings (czmq, pyzmq).
2013-01-17 15:48:18 -08:00
Adrian Muraru
35f18aef74 Fixed newline in test_disconnect_inproc 2013-01-12 16:21:56 +02:00
Pieter Hintjens
d997d88096 Revert "Old change to move ports off 5555 (was conflicting with other stuff)"
This reverts commit da0efaa817.
2013-01-08 09:18:38 +01:00
Pieter Hintjens
aff1406713 Revert "Test cases were failing on bind"
This reverts commit 8ba097f3da.
2013-01-08 09:18:23 +01:00
Pieter Hintjens
da0efaa817 Old change to move ports off 5555 (was conflicting with other stuff) 2013-01-08 09:09:27 +01:00
Pieter Hintjens
8ba097f3da Test cases were failing on bind 2013-01-08 09:08:01 +01:00
Min(Dongmin Yu)
a0cecc718d returns -1 with EAGAIN when mandatory is set and pipe is full 2012-12-11 19:41:36 +09:00
Min(Dongmin Yu)
9382941adc returns EHOSTUNREACH when a peer is full if ZMQ_ROUTER_MANDATORY is set 2012-12-08 10:20:42 +09:00
KIU Shueng Chuan
6706efba28 fix wrong boolean operator 2012-12-07 17:45:05 +08:00
Stefan Radomski
66c22456b9 Close pipes for inproc sockets on zmq_disconnect
- fixes LIBZMQ-476 and LIBZMQ-475
2012-12-04 15:14:21 +01:00
Ian Barber
75161b5c62 Serialise test_connect_delay
Simplify the test connect delay test script, removing the threads and
moving to a serialised version. AFAICS this should provide the same
test, but without the race conditions that happened with the previous
test.
2012-11-30 23:07:12 +00:00
Christopher Dolan
6559da3033 Use memset/memmove rather than bzero/bcopy 2012-11-13 19:33:18 +00:00
Martin Hurton
aec47b3642 Extend ZMQ_ROUTER_RAW test
Add test when the zeromq socket connects to a TCP socket.
The test now fails due to bug in the zeromq library.
2012-11-08 19:05:27 +01:00
Pieter Hintjens
777c38ae32 Renamed raw option to ZMQ_ROUTER_RAW 2012-11-06 13:18:58 +01:00
Martin Hurton
9d8eb1f9b9 Style fixes 2012-10-30 12:18:30 +01:00
Martin Hurton
d16e0a5342 Resolve LIBZMQ-458
Ref: https://zeromq.jira.com/browse/LIBZMQ-458
2012-10-30 11:03:43 +01:00
Hardeep
83387b4073 Added support for non-zmq tcp client connections to router socket.
- Created a new option ZMQ_ROUTER_RAW_SOCK
    - Added new raw_encoder and raw_decoder to receive and send messages in raw form to remote client
    - Added test case file tests/test_raw_sock.cpp

    o To create a raw router sock set the ZMQ_ROUTER_RAW_SOCK option
    o ZMQ_MSGMORE flag is ignored for non-id messages
    o To terminate a remote connection send id message followed by zero length data message
2012-10-29 00:03:36 -07:00
Martin Hurton
ef794925b4 Resolve LIBZMQ-452
Ref: https://zeromq.jira.com/browse/LIBZMQ-452
2012-10-25 09:13:48 +02:00
Pieter Hintjens
983ee761b1 Renamed ZMQ_ROUTER_BEHAVIOR to ZMQ_ROUTER_MANDATORY for clarity 2012-10-08 16:36:35 +09:00
Lourens Naudé
8a57e4a5d7 Merge branch 'master' into fix-monitor 2012-09-21 12:55:01 +01:00
Lourens Naudé
759d453368 Significantly reworked the monitoring infrastructure with a more granular per socket API and to play well with monitoring endpoints in application threads 2012-09-21 12:53:31 +01:00
Joshua Gao
67d88bcb41 Add pthread.h include to test_connect_delay.cpp
This test case uses pthreads, but doesn't include the header.
2012-09-18 13:46:48 -07:00
Arthur O'Dwyer
cf20932df0 Add "#undef NDEBUG" to all tests.
This change makes sure that even if the tests are built in a
"release" configuration (with optimizations and NDEBUG turned on),
the assertions won't get compiled out of the tests themselves.

The C standard guarantees that the most recent inclusion of
<assert.h> is the one that counts, so it's important that the
"#undef NDEBUG/#include <assert.h>" come as the last thing in
the block of header files.

"testutil.hpp" includes <assert.h>, so I've left <assert.h> out
of any test that #includes "testutil.hpp", just for the sake of
brevity.
2012-09-06 10:03:12 -07:00
Ian Barber
d7331b7b1f Fixing PGM issues
Hopefully fixed LIBZMQ-427 - there was a slight typo in the init_address
refactor. The encoder refactoring had also broken pgm_sender and
receiver, but just required updating to use the new functions.
2012-09-04 23:24:48 +01:00
Arthur O'Dwyer
08f6a9e7e8 Remove unused argc/argv parameters in tests. 2012-08-27 16:10:47 -07:00