Martin Sustrik
f78d9b6bfc
Session class separated into socket-type-specific sessions
...
This is a preliminary patch allowing for socket-type-specific
functionality in the I/O thread. For example, message format
can be checked asynchronously and misbehaved connections dropped
straight away.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-15 10:00:23 +02:00
Martin Sustrik
78b02d142e
Minor optimisation in message distribution algorithm
...
If several of the outbound pipes become passive while sending
a single message, the refcount on the message is adjusted
once only, not multiple times. It's an atomic operation so
the cost is not negligible.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-14 15:16:48 +02:00
Martin Sustrik
cf499ee016
Bug in message distribution algorithm fixed (issue 251)
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-14 14:31:09 +02: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
Mikko Koppanen
8f8bfcaba0
Fixed issue with req assertions (issue 252)
...
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-13 16:27:07 +02:00
Mikko Koppanen
e191e806ea
Fix polling system detection on mingw32 build
...
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-09-06 08:51:23 +02:00
Mikko Koppanen
9d0e122bfa
Added option to choose internal polling system
...
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-09-04 10:28:15 +02:00
Martin Sustrik
193fa1c079
Accept square brackets around IPv6 address
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-03 10:19:08 +02:00
Pieter Hintjens
4138aca54b
Fixed doc to clarify how label parts work
...
Signed-off-by: Pieter Hintjens <ph@imatix.com>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-03 09:02:56 +02:00
Martin Sustrik
9fb9fea633
Improve error reporting in a minor way
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-03 07:40:49 +02:00
Martin Sustrik
8b7ac4c2a9
Close file descriptors on exec (issue 218)
...
When exec is executed to start a different process image old
0MQ file descriptors could stay open, thus blocking TCP ports
and alike. This patch should solve the problem.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-02 15:34:12 +02:00
Martin Sustrik
2910a728dc
msg_t::rm_refs closes the message when number of refs drops to 0 (issue 245)
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-02 13:44:22 +02:00
Martin Sustrik
82ab08d871
Premature deallocation bug in XSUB fixed (issue 244)
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-01 13:02:22 +02:00
Martin Sustrik
65bb75863d
Fixed warnings on Win64
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-01 07:26:17 +02:00
Martin Sustrik
940c5b346b
zmq_msg_t changed to structure
...
zmq_msg_t being defined as unsigned char[32] could not be stored
in STL containers. Fixed by this commit.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-31 15:23:00 +02:00
Martin Sustrik
dd7c629a27
Typo fixed in zmq_socket(3)
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-19 14:42:31 +02:00
Martin Sustrik
80a5f60e33
NIC name resolution moved to tcp_address_t
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-19 12:34:31 +02:00
Martin Sustrik
f0c7edbc9c
Missing include added to ip.cpp
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-18 21:16:22 +02:00
Martin Sustrik
898ee99dc1
Windows build fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-18 17:58:46 +02:00
Martin Sustrik
b6ecb00d23
TCP address related functionality moved to tcp_address_t
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-18 17:40:42 +02:00
Martin Sustrik
4a8dd1e404
MSVC build fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-18 11:24:14 +02:00
Martin Sustrik
b01a8e1751
IPC address related functionality refactored into ipc_address_t class
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-18 11:08:22 +02:00
Martin Sustrik
3488af048f
Fix the PGM support on win64
...
On win64 the size of file descriptor is not the same as size of int.
The bug in PGM transport caused a runtime error because of this.
The problem is fixed now.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-17 18:41:02 +02:00
Martin Sustrik
ed373450a2
MSVC build fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-16 12:59:49 +02:00
Martin Sustrik
b3bac17607
tcp_engine renamed to stream engine
...
The engine was not used exclusively for TCP connections.
Rather it was used to handle any socket with SOCK_STREAM
semantics. The class was renamed to reflect its true function.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-16 12:44:34 +02:00
Martin Sustrik
41457e1ff1
Semaphores are not used anymore, build system is adjusted accordingly
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-15 22:02:15 +02:00
Martin Sustrik
714d3b288f
EAFNOSUPPORT defined on Windows platform
...
Windows headers don't defined this error.
This patch defines it if not already defined.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-15 20:39:48 +02:00
Ghislain Putois
85851d3127
Preliminary Android support
...
Some small changes to prepare a cross-compilation for the Android platform
Signed-off-by: Ghislain Putois <ghpu@infonie.fr>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-15 19:39:21 +02:00
Mikko Koppanen
0354d4d37f
Added Android support
...
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
2011-08-15 19:09:04 +02:00
Steven McCoy
57440b86e2
Add IPv6 support to tcp_listener
...
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-15 08:56:00 +02:00
Martin Sustrik
3c3c0bfd1f
Minor problems in MSVC build fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-15 08:02:36 +02:00
Martin Sustrik
9196c48256
select version zmq_poll reports invalid FDs
...
Till now, passing invalid file descriptor to zmq_poll()
caused asseration. Now it returns error.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-14 14:23:16 +02:00
Martin Sustrik
9380098534
Compilation error on HP-UX and AIX fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-14 14:06:42 +02:00
Martin Sustrik
6dc3b2a657
Compilation error on FreeBSD fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-14 13:48:28 +02:00
Martin Sustrik
a3f27400de
Minor compile-time bug on Windows fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-08 18:49:30 +02:00
Steven McCoy
1c54ce37b3
tcp_connecter disables IPV6_IPV6ONLY if needed.
...
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-08 16:07:54 +02:00
Steven McCoy
c27b9ac7de
Update resolve_ip_interface and resolve_ip_hostname with ipv4only parameter.
...
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-08 15:23:46 +02:00
Steven McCoy
9184a54f64
Update resolve_nic_name to take more generic sockaddr parameter.
...
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
2011-08-08 12:39:13 +02:00
Steven McCoy
784041f5b9
ZMQ_IPV4ONLY option added
...
At this point option exists, is documented and can be set,
however, it has no effect.
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-08 12:10:31 +02:00
Martin Sustrik
8378180cbb
Minor bug in vtcp_listener fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-07 16:09:52 +02:00
Martin Sustrik
24230515f5
vtcp connection string simplified
...
Till now, vtcp connection contained both port and subport.
Now the port, if not specified, defaults to 9220.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-04 13:11:15 +02:00
Martin Sustrik
be48970977
MSVC build brought up-to-date
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-08-04 07:44:35 +02:00
Martin Sustrik
d5f3628ad0
Different connecters simplified
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-29 09:37:43 +02:00
Martin Sustrik
f63db009a1
Different listener implementations simplified
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-28 16:32:08 +02:00
Martin Sustrik
b45fec337a
Tuning of TCP sockets is done at a single place
...
Instead of being spread throughout the codebase, the tuning
is done in tune_tcp_socket() function.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-28 15:13:04 +02:00
Martin Sustrik
46b053b8d6
Dead code removed from TCP and IPC transports
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-28 13:46:16 +02:00
Martin Sustrik
5ac63140b0
Implementations of TCP and IPC transports separated
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-28 13:19:55 +02:00
Martin Sustrik
6e987428d4
Precise reconnect interval randomised
...
Till now the random fraction of the reconnect interval was
computed based on process ID. This patch uses pseudo-random
generated (seeded by exact time of when the process was
started) to compute the interval.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-28 09:02:54 +02:00
Martin Sustrik
ce7a9a58e3
Setting TCP socket options moved to tcp_engine_t
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-28 08:06:21 +02:00
Martin Sustrik
588c728702
vtcp_connecter fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-27 09:29:48 +02:00
Martin Sustrik
d7319de3d0
First version of vtcp_connecter added
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-26 22:57:19 +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
279302c5f5
Experimental VTCP listener added
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-26 18:35:40 +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
9119b4fd7b
TCP transport classes simplified
...
zmq_engine and tcp_socket merged into tcp_engine
zmq_connecter and tcp_connecter merged into tcp_connecter
zmq_listener and tcp_listener merged into tcp_listener
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-26 00:43:57 +02:00
Martin Sustrik
43b5b3444c
PGM subscription forwarding fixed
...
PGM when using in XPUB socket has to subscribe for all the messages
as it has no idea what the subscribers are interesred in.
This generic subscribe message was malformed. Fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-24 18:30:48 +02:00
Martin Sustrik
7c1dca546d
Session classes merged into a single class
...
Removal of ZMQ_IDENTITY resulted in various session classes doing
almost the same thing. This patch merges the classes into a single
class.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-24 18:25:30 +02:00
Martin Sustrik
f716b571ba
Only one polling mechanism is compiled
...
Till now wrappers for all the polling mechanisms available on
the given platform were compiled, although only one of them
was used. This patch compiles just the used one. This can
make libzmq binary more concise.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-24 18:13:29 +02:00
Martin Sustrik
0e71b111f4
Obsolete include in ctx.hpp removed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-24 18:09:50 +02:00
Martin Sustrik
11e21d027d
semaphore_t class removed
...
The class was not used anywhere anymore. Removed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-24 18:06:04 +02:00
Martin Sustrik
837451eddc
Remove blob_t class
...
The class was used in a single place. Replaced by a local typedef.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-24 17:50:05 +02:00
Martin Sustrik
5650743d9e
MSVC build brought up to date
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-22 08:35:01 +02:00
Martin Sustrik
75c4e0e62b
mailbox::recv correctly passes EINTR to the caller
...
This bug caused signal during blocking call to assert.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-21 23:35:26 +02:00
Martin Sustrik
4bd335932c
ECANTROUTE error documented in zmq_sendmsg(3)
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-21 19:14:39 +02:00
Martin Sustrik
6b873d4ffd
ROUTER socket blocks on SNDHWM
...
Till now the message was droppen in such case.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-21 19:12:51 +02:00
Martin Sustrik
a1e09facb2
ROUTER socket reports error when message cannot be routed
...
Till now, message was silently dropped if it was sent to
a non-existent peer. Now, ECANTROUTE error is returned.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-21 18:54:27 +02:00
Martin Sustrik
72a793f78a
ZMQ_GENERIC renamed to ZMQ_ROUTER
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-21 18:43:50 +02:00
Martin Sustrik
cb2d715605
endmsg(3) and zmq_recvmsg(3) added to RPM spec file
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-21 11:51:41 +02:00
Martin Sustrik
a808431d1d
Fixed email addresses in the MAITAINERS file
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-18 14:29:20 +02:00
Pieter Hintjens
a33a275e3b
Fixed issue 230
...
Signed-off-by: Pieter Hintjens <ph@imatix.com>
2011-07-18 12:53:55 +02:00
Martin Sustrik
7298b5742f
Includes in zmq.cpp cleaned-up
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-18 11:39:38 +02:00
Steven McCoy
18d8be5e92
Fix pollin on Cygwin.
...
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
Signed-off-by: Martin Sustrik <sustrik@250bom.com>
2011-07-18 10:54:53 +02:00
Martin Sustrik
ac20e17cbd
Reference to C++ binding removed from zmq(7)
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-18 10:04:05 +02:00
Martin Sustrik
66ff99c457
Martin Lucina remove from MAINTAINERS file
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-18 10:00:09 +02:00
Martin Sustrik
f97f50c252
Signaler timeout bug on Windows fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-18 09:41:26 +02:00
Martin Sustrik
1a40880552
ZMQ_IDENTITY option removed from the documentation
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-18 09:30:37 +02:00
Martin Sustrik
89daa57faa
Missing files for GENERIC socket implementation added
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-18 09:28:59 +02:00
Martin Sustrik
bf78e230ad
GENERIC socket type and COMMAND flag added
...
GENERIC allows to use 0MQ as a dumb networking framework.
It provides user with connect/disconnect notifications.
Also, each inbound message is labeled by ID of the connection
it originated from. Outbound messages should be labeled by
the ID of the connection to send them to.
To distinguish connect/disconnect notifications from common
messages, COMMAND flag was introduced.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-17 23:31:29 +02:00
Martin Sustrik
c8e8f2a24c
ZMQ_IDENTITY socket option removed
...
This patch simplifies the whole codebase significantly,
including dropping depedency on libuuid.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-15 11:24:33 +02:00
Martin Sustrik
ba67eff167
non-immediate_connect functionality removed
...
It was used only by ROUTER socket. After its removal it became
obsolete.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-15 08:26:29 +02:00
Martin Sustrik
364839f3e6
Debian packaging removed
...
It is now maintained as a separate project.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-15 08:18:20 +02:00
Martin Sustrik
e4f98d1e10
ROUTER and DEALER sockets removed
...
To be replaced by new generic socket type
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-15 08:16:40 +02:00
Martin Sustrik
73630de98a
Version number bumped to 4.0.0
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-15 08:11:42 +02:00
Martin Sustrik
57c1342c68
Bug with setting options on SUB socket fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-12 13:05:58 +02:00
Martin Sustrik
29274811cc
zmq_bind(3) and zmq_connect(3) describe EINVAL error
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-11 16:05:04 +02:00
Martin Sustrik
2afb791ec2
Subscription forwarding test added
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-11 15:54:13 +02:00
Martin Sustrik
215cfc653e
REQ/REP drop test extended
...
The test now checks whether replies are dropped when reply pipe
is overflowed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-11 15:28:02 +02:00
Martin Sustrik
c7542981d1
PGM transport reconciled with subscription forwarding
...
As PGM is not capable of passing subscriptions upstream,
subscriptions are ignored at sub side and engine subscribes
for all messages on pub side.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-11 10:18:30 +02:00
Martin Sustrik
d7adc3f19a
ZMQ_FILTER option removed
...
The filtering is now done depending on the socket type. SUB socket
filters the messages (end-to-end filtering) while XSUB relies
on upstream nodes to do (imprefect) filtering.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-11 09:57:59 +02:00
Martin Sustrik
a154ef69da
Man pages for send & recv function brought up to date
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-11 08:34:20 +02:00
Martin Sustrik
7e1251178b
Experimental code from zmq_init_t removed.
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-11 07:26:45 +02:00
Martin Sustrik
52eaf600e5
Drop outbound messages in XREP socket when SNDHWM is reached
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-09 09:40:40 +02:00
Martin Sustrik
aa2150c25c
VSM data are aligned to 32/64 bit boundary
...
Till now the VSM buffer was aligned to 16 bit boundary
which could possibly cause problems on RISC architectures
when accessing the message data in unsafe manner.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-08 18:12:59 +02:00
Martin Sustrik
1526ff638c
License text in autogen.sh fixed
...
autogen.sh incorrectly referred to the license as GPL.
Changed to LGPL.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-04 09:27:50 +02:00
Martin Sustrik
8d96036fcd
Build system checks for presence of eventfd.h header
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-03 16:11:11 +02:00
Martin Sustrik
8fb9d3c6d0
Merge branch 'master' of github.com:zeromq/libzmq
2011-07-03 15:33:25 +02:00
Martin Sustrik
6ae1be1a12
Race condition in eventfd signaler fixed
...
recv function on eventfd signaler could accidentally
grab two signals instead of one. Fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-03 15:30:31 +02:00
Martin Sustrik
9a9a0cf410
eventfd implementation of the signaler
...
Eventfd (on Linux) is more efficient that socketpair
for passing simple signals.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-03 15:13:57 +02:00
Martin Sustrik
c687c7e61e
Fix MSVC build
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-03 14:11:33 +02:00
Martin Sustrik
da26134aa6
Inproc tests need no I/O threads
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-03 13:44:41 +02:00