0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-14 09:47:56 +08:00

1114 Commits

Author SHA1 Message Date
Mikko Koppanen
e62686aca5 RPM packaging improvements
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-04-09 08:45:12 +02:00
Mikko Koppanen
6fd403c4d8 Make pkg-config dependency conditional
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-04-04 22:52:02 +02:00
Martin Sustrik
4b52cf949f TCP and IPC connection initiation allow for multiple properties
So far the only property passed on connection initiation was
identity. The mechanism was now made extensible. Additional
properties are needed to introduce functionality such as
checking the peer's socket type, "subports" etc.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-04 17:53:49 +02:00
Martin Sustrik
8203c4dbb2 Another error handling issue on Win32 solved
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-04 13:12:46 +02:00
Martin Sustrik
475ba3849d Issue with error checking on Win32 platform fixed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-04 12:49:39 +02:00
Martin Sustrik
1842628b90 Unreferenced variable removed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-04 12:12:06 +02:00
Robert G. Jakabosky
2c7af35827 Add note about thread-safety to zmq_msg_init_data() manpage.
Signed-off-by: Robert G. Jakabosky <bobby@sharedrealm.com>
2011-04-03 20:44: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
Mikko Koppanen
a48b6cfc00 Additional gcov changes
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-04-03 07:34:14 +02:00
Mikko Koppanen
656b646bc6 Large rename: AC_ZMQ_ to LIBZMQ_ and ac_zmq_ to libzmq_. Fixes "warning suspicious cache-id"
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-04-02 22:50:46 +02:00
Mikko Koppanen
bdeddb89f7 Added code coverage checking
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-04-02 22:49:41 +02:00
Mikko Koppanen
7af18468f8 Add option to build with system opepgm
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-04-02 22:48:52 +02:00
Martin Sustrik
0e0e4559a0 Project location on github changed in README file
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-02 19:32:44 +02:00
Pieter Hintjens
3e655227bd Fixed memory leak with threads on win32
Signed-off-by: Pieter Hintjens <ph@imatix.com>
2011-04-02 09:22:41 +02:00
Martin Sustrik
85c2a84036 inproc perf tests now work on Windows
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-02 09:50:35 +02:00
Martin Sustrik
54830ac0f6 MSVC build system updated to match 3.0 changes
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-02 09:03:57 +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
Martin Sustrik
599df5203c PGM wire format specification improved in zmq_pgm(7)
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-04-01 11:53:51 +02:00
Martin Sustrik
cce57617c7 Ian Barber and Zed Shaw added to credits section
talks on conferences, videos

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-31 23:49:28 +02:00
Martin Sustrik
5142a1624b Robert G. Jakabosky added to the AUTHORS file
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-31 23:16:14 +02:00
Robert G. Jakabosky
d84558e172 Adding thread latency/throughput perf. examples.
Signed-off-by: Robert G. Jakabosky <bobby@sharedrealm.com>
2011-03-31 23:14:38 +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
d36d9a378a Comments improvement
related to fairness while reading/writing large messages

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-27 19:41:32 +02:00
Martin Sustrik
17fdb5e3a8 zmq_recv() returns size of the message even if it's truncated
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-27 09:50:25 +02:00
Martin Sustrik
82dbef360c Memory leak in zmq_recv fixed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-26 11:05:55 +01:00
Martin Sustrik
abb184a051 ZMQ_NOBLOCK renamed ZMQ_DONTWAIT
Done because of POSIX compliance

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-26 10:38:40 +01:00
Martin Sustrik
bc4a1ce334 ZMQ_HWM split into ZMQ_SNDHWM and ZMQ_RCVHWM
These new options allow to control the maximum size of the
inbound and outbound message pipe separately.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 16:47:33 +01:00
Martin Sustrik
507718ee1a ZMQ_HWM type changed to int
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 15:43:03 +01:00
Martin Sustrik
bd9d7715eb ZMQ_RATE and ZMQ_RECOVERY_IVL types cahnged to int
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 15:18:20 +01:00
Martin Sustrik
d61f067f5b ZMQ_EVENTS type changed to int
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 15:07:23 +01:00
Martin Sustrik
23bd3726a5 ZMQ_RCVMORE type changed to int
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 14:59:43 +01:00
Martin Sustrik
17e82a3611 ZMQ_SNDBUF and ZMQ_RCVBUF type changed to int
This mimics POSIX specification.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 14:48:50 +01:00
Martin Sustrik
a2252de2bc ZMQ_RECOVERY_IVL and ZMQ_RECOVERY_IVL_MSEC reconciled
There's only one option now -- ZMQ_RECOVRY_IVL --
and it's measured in milliseconds.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 14:36:40 +01:00
Martin Sustrik
8463b4d55e SWAP functionality removed
On-disk storage should be implemented in devices rather than
in 0MQ core. 0MQ is a networking library and there's no point
in storing network buffers on disk.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 12:27:06 +01:00
Martin Sustrik
fb27a000d9 send/recv was changed to send/recv/sendmsg/recvmsg
send/recv now complies with POSIX by using raw buffers instead
of message objects and by returning number of bytes sent/recvd
instead of 0/-1.

The return value is changed accordingly for sendmsg and recvmsg.

Note that related man pages will be fixed in a separate patch.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 11:53:55 +01:00
Martin Sustrik
d4e83d2601 C++ binding removed from the core
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 10:18:06 +01:00
Martin Sustrik
7d87db0529 Auto-tests modified to use C API instead of C++ binding
As a side effect, broker HWM test was fixed.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-24 10:03:49 +01:00
Martin Sustrik
941be8d217 zmq_device removed
Devices are basically applications on top of 0MQ stack. They
should reside in separate libraties.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-23 17:44:16 +01: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
b45b68ae4a ZMQ_MCAST_LOOP removed
Multicast loopback is not a real multicast, rather a kernel-space
simulation. Moreover, it tends to be rather unreliable and lossy.
Removing the option will force users to use transports better
suited for the job, such as inproc or ipc.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-23 17:01:39 +01:00
Martin Sustrik
f5e6d67948 Timeout in zmq_poll is in milliseconds
The old timeout in microsecond haven't been compliant with
POSIX and was impractical at the same time.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-23 15:50:18 +01:00
Martin Sustrik
e3cf6e9ced Obsolete note removed from zmq_poll(3) manpage
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-23 15:40:35 +01:00
Martin Sustrik
34d7854199 Obsolete constants ZMQ_UPSTREAM and ZMQ_DOWNSTREAM removed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-23 15:26:47 +01:00
Martin Sustrik
dee5f650dd Version bumped to 3.0.0
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-23 15:24:18 +01:00
Martin Sustrik
1619b3d84a Message atomicity bug in load-balancer fixed
If the peer getting the message have disconnected in the middle
of multiplart message, the remaining part of the message went
to a different peer. This patch fixes the issue.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-20 20:52:54 +01:00
Martin Sustrik
92c7c18367 Message atomicity problem solved in PUB socket
When new peer connects to a PUB socket while it is in the middle
of sending of multi-part messages, it gets just the remaining
part of the message, i.e. message atomicity is broken.

This patch drops the tail part of the message and starts sending
to the peer only when new message is started.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-20 11:50:51 +01:00
Martin Sustrik
fac9c2da56 zmq_socket(3) and zmq_setsockopt(3) man pages improved
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-16 16:32:31 +01:00
Martin Sustrik
f5015f4c93 Incorrect errno reported from tcp_listener_t::set_address
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-16 13:48:40 +01:00
Martin Sustrik
32ded2b457 Duplicate identities now checked with zmq_connect
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-16 13:26:23 +01:00
Jon Dyte
b79d07b8bc reset socket state when identity message cannot be written to xrep
Signed-off-by: Jon Dyte <jon@totient.co.uk>
2011-03-16 09:54:03 +01:00
Martin Sustrik
7045a4a213 Dead code removed from named_session.cpp
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-15 13:11:20 +01:00
Martin Sustrik
f987f4b3e2 FreeBSD complation error fixed
There was an error in pgm_receiver wrt strict aliasing.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-14 20:29:00 +01:00
Martin Sustrik
2970d6c30b Remove obsolete assert from pgm_socket.cpp
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-14 07:11:30 +01:00
Guido Goldstein
d0c8edde35 Added missing close method w/ check if socket is already closed.
Signed-off-by: Guido Goldstein <github@a-nugget.de>
2011-03-12 17:16:27 +01:00
Martin Sustrik
7b95c5920c Windows build fixed
Compilation of ip.cpp have failed because EPROTONOSUPPORT
was undefined. Including zmq.h should help as the error
code is defined there.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-09 16:34:37 +01:00
Brett Cameron
b00be2651c Different fixed to make OpenVMS port work.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-08 14:39:52 +01:00
Martin Sustrik
184bdb8e2b Bug caused by interaction of REQ/REP routing and HWM fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-03 12:37:11 +01:00
Martin Sustrik
97add1ec2f Documentation wrt thread-safety cleaned up.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-03 12:15:08 +01:00
Martin Sustrik
18b9ebea32 The copyrights in file headers updated.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-02 16:30:40 +01:00
Martin Sustrik
5fcef1cac4 ZMQ_MAXMSGSIZE option added
The new option allows user to guard against peers sending
oversized messages. Connection to peer sending oversized message
is dropped.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-02 09:00:36 +01:00
Martin Sustrik
4c7446211a Explicit identities bug in inproc transport fixed.
The identity of bound socket was not used. Instead, transient
identity was generated.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-01 16:08:40 +01:00
Martin Sustrik
67b1f14190 Memory leak in PUB/XPUB sockets fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-26 08:42:20 +01:00
Martin Sustrik
d4e418f5f4 Socket with no owner objects is deallocated immediately
Till now the deallocation of such socket was delayed
till zmq_term() thus creating a "leak".

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-25 08:58:01 +01:00
Martin Sustrik
c22e52737a Minor patch to zmq_getsockopt(3) man page
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-24 16:57:53 +01:00
Martin Sustrik
29e0e7dbad Incorrect PGM sender/receiver creation fixed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-23 11:48:49 +01:00
Martin Sustrik
820fec7f28 Version bumped to 2.2.0
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-22 21:43:52 +01:00
Martin Sustrik
43e8868875 Added explicit error message in case of memory exhaustion
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-22 16:23:36 +01:00
Mikko Koppanen
98ccff1a24 Fixes build on at least CentOS 5
Signed-off-by: Mikko Koppanen <mikko.koppanen@gmail.com>
2011-02-21 23:40:48 +01:00
Martin Sustrik
0eea93526d Fix for memory leak caused by long identities
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-21 17:49:12 +01:00
Martin Sustrik
5c0931121b Computation of buffer size for PGM fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-21 11:22:54 +01:00
Martin Sustrik
12486fecc4 Fix MSVC and SunStudio builds with OpenPGM
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-18 17:57:59 +01:00
Martin Sustrik
17e2ca71b4 Logging of duplicit identities added
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-18 14:15:10 +01:00
Martin Sustrik
1f536b2d38 Init object is child of listener
This means that all the handshaking while accepting incoming
connection is done exclusively in I/O threads, thus it won't
overload the application thread's mailbox.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-17 14:20:19 +01:00
Martin Sustrik
28f3e87fc6 Add delay before reconnecting
So far ZMQ_RECONNECT_IVL delay was used only when TCP connect
failed. Now it is used even if connect succeeds and the peer
closes the connection afterwards.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-17 10:33:38 +01:00
Michael Compton
fbe5d859f4 Added note regarding setting sockopt before bind/connect
Signed-off-by: Michael Compton <michael.compton@littleedge.co.uk>
2011-02-15 09:33:19 +01:00
Martin Sustrik
ba26cc9938 Build problem with OpenPGM and MSVC fixed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-13 10:07:10 +01:00
Pieter Hintjens
14a0e147b2 Fixed win32 issue with WSAStartup
- ctx constructor was calling mailbox_t constructor implicitly
 - moved WSAStartup and WSACleanup to be outside constructor/destructor

Signed-off-by: Pieter Hintjens <ph@imatix.com>
2011-02-12 18:36:21 +01:00
Martin Sustrik
e94790006e reaper added to MSVC build
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-09 22:33:57 +01:00
Martin Sustrik
5b82b1ba30 Reaper thread waits for commands rather them retrieving them periodically
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-09 22:23:21 +01:00
Martin Sustrik
80ac398bba Initial implementation of reaper thread.
Reaper thread destroys the socket asynchronously.
zmq_term() can be interrupted by a signal (EINTR).
zmq_socket() will return ETERM after zmq_term() was called.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-09 15:32:15 +01:00
Martin Sustrik
889424e675 max_sockets honoured precisely
The internal log socket was subtracted from the number of
available sockets. So, if max_sockets was set to 100,
you could create only 99 sockets. Fixed.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-08 16:19:37 +01:00
Martin Sustrik
5dcbc34396 zmq_poll with no fds behaves decently
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-08 14:46:27 +01:00
Mikko Koppanen
908b39bf83 m4_esyscmd_s doesnt seem to be portable across different systems
Signed-off-by: Mikko Koppanen <mikko.koppanen@gmail.com>
2011-02-07 15:06:20 +01: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
Chris Rempel
4efead1bbb Fixed autogen.sh warnings on Debian 6 systems.
Signed-off-by: Chris Rempel <csrl@gmx.com>

Please enter the commit message for your changes. Lines starting
2011-02-05 14:42:21 +01:00
Thijs Terlouw
042e34a5d9 operator void* () added to context_t.
Makes it possible to share the context from C++ to C.

Signed-off-by: Thijs Terlouw <thijsterlouw@gmail.com>
2011-02-04 16:44:13 +01:00
Martin Sustrik
3f758ab2f4 Don't use RLIMIT_NOFILES in devpoll_t.
The patch allows for running 0MQ on Solaris and HP-UX
even though ulimit for max number of file descriptors
is set to unlimited.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-03 09:59:54 +01:00
Martin Sustrik
ca1acc340c RLIMIT_NOFILE not used in poll_t anymore
The problem was that RLIMIT_NOFILE can be set to RLIM_INIFINITY
(and that appears to be default on AIX) which caused 0MQ to fail.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-02-03 08:46:04 +01:00
Mikko Koppanen
1e0302633e Added WithOpenPGM configuration into MSVC builds
Signed-off-by: Mikko Koppanen <mikko.koppanen@gmail.com>
2011-01-30 12:43:17 +01:00
Mikko Koppanen
72d320366f Added test for HWM
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-01-30 11:51:30 +01:00
Martin Sustrik
1b15eba9a9 Fixed the problem of subscription forwarding and PGM interaction
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-01-28 07:50:21 +01:00
Thijs Terlouw
f7f1dfc86d ZMQ_RECONNECT_IVL_MAX socket option added
It allows for exponential back-off strategy when reconnecting.

Signed-off-by: Thijs Terlouw <thijsterlouw@gmail.com>
2011-01-26 07:01:06 +01:00
Mikko Koppanen
8e61a11b39 Do not execute ipc tests under MinGW
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-01-20 22:13:01 +01:00
Mikko Koppanen
8561a55d2c Remove unnecessary visibility pragmas
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-01-20 22:12:25 +01:00
Dhammika Pathirana
c91bf25645 Fix handle connection reset during session init
Patch to handle nmap version probes.

Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
2011-01-20 07:52:40 +01:00
Martin Sustrik
56bdba592c Fix cppcheck warnings: Prefer prefix ++/-- operators for non-primitive types.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-01-18 15:57:45 +01:00
Martin Sustrik
b262f2fe9b Typo fixed in zmq_send(3) man page.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-01-17 14:51:01 +01:00
Steven McCoy
667b247e32 Cancel pending timers when decoder for PGM stalls
Otherwise the timer event can raise an input event
causing assertion on unprocessed data.

Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
2011-01-17 14:45:24 +01:00
Martin Sustrik
a249d15200 Fix MSVC build
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-01-15 20:16:00 +01:00
Martin Sustrik
59fa0c9b46 Gerard Toonstra added to the authors file
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-01-14 12:41:12 +01:00