Commit Graph

88 Commits

Author SHA1 Message Date
Pieter Hintjens
50859e40b9 Problem: drop tests on CLIENT/SERVER are misleading
These sockets deal only with single part data (at present), so the
drop tests are misleading / inappropriate.

Solution: remove them.
2015-09-13 12:17:53 +02:00
somdoron
1aaa893e02 add tests for polling on thread safe sockets 2015-08-16 13:57:28 +03:00
sappo
8bf4d1eaaf Problem: Missing src/ prefix for libzmq library in Makefile.am for test_getsockopt_memset
Solution: Add prefix to fix test compilation
2015-08-13 07:13:00 +02:00
Constantin Rack
effc26c695 Merge pull request #1476 from hintjens/master
Problem: lack test case for large stream messages
2015-08-12 10:03:45 +02:00
Rik van der Heijden
c68e9a39bf Merge fix for zeromq/zeromq4-1#52, getsockopt ZMQ_RCVMORE now resets all bits 2015-08-11 21:37:50 +02:00
Pieter Hintjens
5d5cdac161 Problem: source packages lack makefiles for all systems except msvc
Solution: specify the necessary EXTRA_DIST

I added a Makefile.am in builds that covers all systems except msvc,
which already has a Makefile.am that does this.

Fixes #1505
2015-08-11 19:34:25 +02:00
Jens Auer
6b9b13be6c Fixed whitespace error. 2015-07-20 22:34:22 +02:00
Jens Auer
23797120ff Fixed #1477 corruption in "zero-copy" raw_decoder for payloads larger than 8192 bytes #1477
Fixed wrong message::init arguments.
2015-07-20 22:22:13 +02:00
Jens Auer
3679793601 "zero-copy" raw_decoder
A memcpy is eliminated when receiving data on a ZMQ_STREAM socket. Instead
of receiving into a static buffer and then copying the data into the
buffer malloced in msg_t::init_size, the raw_decoder allocates the memory
for together with the reference-counter and creates a msg_t object
on top of that memory. This saves the memcpy operation.

For small messages, data is still copied and the receive buffer is reused.
2015-07-05 16:05:46 +02:00
Dylan Cali
a9fd750e1c add tests for #949 2015-06-28 21:23:25 -05:00
Jonathan Reams
cbb3b176a6 Add ZMTP heartbeats
This commit adds ZMTP connection heartbeats described in
http://rfc.zeromq.org/spec:37/ZMTP.
2015-06-24 13:24:53 -04:00
Jens Auer
51cb57e2c9 Fixed wrong handling of shared messages
The shared reference count was not shared but copied. msg_t cannot
store the refcnt itsef but has to store a pointer to an externally
allocated (shared) refcnter. The changes to lmsg are reverted to
use content_t again. Howver, this introduces an allocation in v2_decoder
when creating the message which can be avoided. When allocating the reception
buffer, space is allocated for the maximum number of reference counts
(8192 / max_vsm_size = 8192/64 = 128 zmq:atomic_counter objects). This
increases the buffer by 128*sizeof(atomic_counter) = 128*4 = 512 bytes only.
When creating a message, the refcnt member is set to the address of one of the
pre-allocated atomic_counter_t objects. To do so, a new msg_t type zcmsg
is introduced because msg::copy must discriminate between the message types
when releasing memory.
2015-06-14 13:35:33 +02:00
Min RK
fdb7d68056 test zmq_msg custom free-function
new allocation caused reference counters to lose track on copy
2015-06-08 15:18:53 -07:00
Min RK
f34cc24bd7 test proxy with single REP socket 2015-06-06 21:05:55 -07:00
Richard Newton
9f8b8af926 Fail ZMQ_SNDHWM and ZMQ_RCVHWM setsockopt if already connected. 2015-06-05 10:43:40 +01:00
Pieter Hintjens
e37d715702 Problem: tests/test_socketopt_hwm fails and breaks CI
Solution: mark this as XFAIL
2015-06-04 23:57:50 +02:00
Kapp Arnaud
fb960147ca Introduce a failing test against zmq_setsockpt().
Problem: zmq_setsockpt() returns success when changing the
HWM after a bind or connect() even though the call has no effect.

Solution: Introduce a failing test a reminder we need to patch it.
2015-06-04 01:38:45 +02:00
Pieter Hintjens
74888769d6 Problem: incomplete specs for test_proxy_terminate
Solution: fixed this in Makefile.am
2015-05-01 11:31:45 +02: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
39338e2fe4 Fix autogen.sh warning about trailing whitespace 2015-02-18 12:02:24 -06:00
somdoron
6749c9b3eb thread safety 2015-02-12 18:54:22 +02:00
Florian Ebeling
54b56210ad Problem: curve keygen build cannot be switched off 2015-02-07 15:36:14 +01:00
Florian Ebeling
2d59594a3a Problem: perf tools build cannot be switched off 2015-02-07 15:36:14 +01:00
somdoron
79f162aa7b test the client socket can drop multi frame messages that being sent to it 2015-02-02 16:12:21 +02:00
somdoron
14a19cd5d4 test the server socket can drop multi frame messages that being sent to it 2015-02-02 15:57:30 +02:00
somdoron
862cd41c65 implement client socket type and drop messages when more flag is set on client and server 2015-02-02 11:59:13 +02:00
somdoron
5632b57b4a adds server socket type and routing id to msg 2015-02-02 01:17:37 +02:00
Thomas Rodgers
73bf0fb1a3 Remoe more test_id2fd cruft 2015-01-21 16:44:41 -06:00
Thomas Rodgers
7c0a644625 Remove of ZMQ_IDENTITY_FD socket option
Revert "linking fd to pipe identity via socket option"

This reverts commit fe3e8c5c70.

Conflicts:
	include/zmq.h
	src/pipe.hpp
	src/session_base.cpp
2015-01-09 17:28:50 -06:00
DaiyuHurst
5d084cdfdd Implement a definitive cygwin target for libzmq. 2014-12-29 17:39:19 -05: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
somdoron
768b62eb9d xpub welcome msg 2014-11-26 14:20:55 +02:00
somdoron
96e29f1455 Add manual control over subscriptions to Pub 2014-11-26 13:08:39 +02:00
Phillip Mienk
384fbbeca5 Restore structure to targets lost during nonrecursive refactor. 2014-11-03 14:14:18 -08:00
J.T. Conklin
2e0c1a9883 Append to libzmq_la_CPPFLAGS and libzmq_la_LIBADD. 2014-10-16 20:11:33 -07:00
Phillip Mienk
c8ee16940f Require pkg-config, use pkg-config to pull seek libsodium. 2014-10-16 00:37:57 -07:00
Phillip Mienk
00b3bfab10 Remove local pgm configuration option, cleanup configure.ac, remove unused Makefile.am instances. 2014-10-13 19:10:36 -07:00
Phillip Mienk
c6aedc3837 Partial migration to nonrecursive make. 2014-10-10 14:36:12 -07:00
xantares
e273d94db8 include cmake files in tarball 2013-10-23 19:06:29 +02:00
Pieter Hintjens
7041770108 Added Z85 support
The use of binary for CURVE keys is painful; you cannot easily copy
these in e.g. email, or use them directly in source code. There are
various encoding possibilities. Base16 and Base64 are not optimal.
Ascii85 is not safe for source (it generates quotes and escapes).

So, I've designed a new Base85 encoding, Z85, which is safe to use
in code and elsewhere, and I've modified libzmq to use this where
it also uses binary keys (in get/setsockopt).

Very simply, if you use a 32-byte value, it's Base256 (binary),
and if you use a 40-byte value, it's Base85 (Z85).

I've put the Z85 codec into z85_codec.hpp, it's not elegant C++
but it is minimal and it works. Feel free to rewrap as a real class
if this annoys you.
2013-06-28 22:10:22 +02:00
Mikko Koppanen
e62686aca5 RPM packaging improvements
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-04-09 08:45:12 +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
d4d184a750 Pre-compiled devices removed
Along with the devices, xmlParser which is no longer needed
is removed.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-23 17:33:07 +01:00
Martin Sustrik
eeb8e7c8be Merge branch 'maint'
* maint:
  Makefile.am: Add missing files to distribution, improve maintainer-clean
  configure.in: Extract API version from zmq.h
  Added bin directory to ignore list.

Conflicts:
	configure.in
	include/zmq.h
2010-10-15 17:13:36 +02:00
Martin Lucina
3cf01bf56e Makefile.am: Add missing files to distribution, improve maintainer-clean
Add missing files needed for regenerating configure to the distribution;
add MAINTAINERS; improve maintainer-clean to produce a really clean tree.

Signed-off-by: Martin Lucina <mato@kotelna.sk>
2010-10-15 16:53:45 +02:00
Martin Lucina
3b3df731e6 configure.in: Extract API version from zmq.h
* Added a version.sh and relevant changes to configure.in to extract the API
  version from zmq.h at the time autogen.sh is run.
* Moved the version macros to be next to zmq_version in zmq.h and improved
  the comments.
* Modified ZMQ_MAKE_VERSION to use (x) instead of plain x when expanding
  macro parameters.

Signed-off-by: Martin Lucina <mato@kotelna.sk>
2010-10-15 16:53:15 +02:00
Martin Lucina
d4c8de5050 Merge branch 'maint'
* maint:
  Update .gitignore
  doc: Add 0MQ version to XHTML11 backend footer
  build: Generate ChangeLog in 'make dist', ZIP automatically
2010-09-04 17:49:40 +02:00
Martin Lucina
a6d3629fb4 build: Generate ChangeLog in 'make dist', ZIP automatically
Change 'make dist' to generate the Git ChangeLog file, that way it doesn't
have to be manually updated nor kept in Git which causes unnecessary work.

Also change 'make dist' to invoke 'dist-zip' automatically to generate a
ZIP as well as a .tar.gz.

Thanks to http://live.gnome.org/Git/ChangeLog for the inspiration to
automatically generate ChangeLog.
2010-09-04 17:42:12 +02:00
Martin Lucina
35cb1fade6 Add a basic framework for a test suite
The test suite uses the standard automake support. Tests are always built,
but run only when you do a "make check".
2010-08-27 18:35:59 +02:00
Martin Lucina
d844a90690 zmqd: Removing for now, not ready for 2.0.7 2010-06-04 15:00:31 +02:00