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
Martin Sustrik
7c0c798120
Command are now stored in ypipes instead of in socketpairs
...
Storing commands in OS socket buffers caused whole lot of
problems when free space in the buffer ran out. This patch
stores commands in ypipes instead and uses socketpair just
to signal the other thread, ie. at most one byte is stored
in the socketpair at any single instant.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-03 13:33:45 +02:00
Martin Sustrik
de3838403b
Testing for errors from pthread_* functions fixed
...
pthread_* functions return the error number rather than
setting errno. This was not accounter for till now.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-30 00:05:03 +02:00
Andrew Thompson
4f4cc73280
Use strrchr to ensure we split off the last colon for the service port
...
IPv6 addresses have colons and will produce invalid data for the getaddrinfo lookup.
Signed-off-by: Andrew Thompson <andy@fud.org.nz>
2011-06-29 23:48:19 +02:00
Martin Sustrik
543ad30e7d
Packaging for MSVC build fixed
...
MSVC project files for inproc_lat and inproc_thr were not
packaged during make dist phase.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-28 10:22:27 +02:00
Martin Sustrik
f8bf3a4cef
Rename i_inout to i_engine_sink
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-27 18:16:53 +02:00
Carl Clemens
3ae73ee11f
Typo in zmq_msg_size(3) fixed
...
Signed-off-by: Carl Clemens <carlclemens1@yahoo.com>
2011-06-26 16:19:45 +02:00
Martin Sustrik
770d0bc77c
Fix MSVC build
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-23 08:51:48 +02:00
Martin Sustrik
d1373792f7
Outstanding requests dropped when requester dies (issue 190)
...
So far the requests in req/rep pattern were delivered to and processed
by worker even though the original requester was dead. Thus,
the worker processing replies with noone to deliver results to.
This optimisation drops requests in two situations:
1. Queued inbound requests in XREP socket when peer disconnects.
2. Queued outbound requests in XREQ when socket is closed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-23 07:57:47 +02:00
Martin Sustrik
12532c7940
O(1) fair-queueing in XREP implemented
...
Up to now the complexity of fair-queueing in XREP was O(n).
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-22 16:51:40 +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
Martin Sustrik
10a93bb79f
Unspecified error code from mailbox_t::recv on Win32 fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-21 13:44:44 +02:00
Martin Sustrik
a28928fe37
Introduce ZMQ_ROUTER and ZMQ_DEALER sockets
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-20 13:36:18 +02:00
Martin Sustrik
f437c9ed9b
Fix errors in zmq_getsockopt(3) manpage
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-20 12:27:56 +02:00
Martin Sustrik
ab99975ad4
LABEL flag added to the wire format
...
So far there was no distinction between message parts used by 0MQ
and message parts used by user. Now, the message parts used by 0MQ
are marked as 'LABEL'.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-20 11:33:54 +02:00
Martin Sustrik
ada5d42472
Basic tests now test multi-part messages instead of single-part
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-20 11:16:10 +02:00
Martin Sustrik
c80908c469
Bug fixed in pipe termination
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-20 08:21:00 +02:00
Fabien Ninoles
7572fee979
Optimise block/non-block switching in mailbox_t
...
For the platforms that don't support MSG_DONTWAIT the reader
socket in mailbox_t was kept in non-blocking state and flipped
to blocking state and back when blocking read was requested.
Now, the state is preserved between calls and flipped only
if different type of operation (block vs. non-block) is
requested.
Signed-off-by: Fabien Ninoles <fabien@tzone.org>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-20 08:14:21 +02:00
Martin Sustrik
8440de2b14
Fix minor warning in MSVC build
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-20 08:11:48 +02:00
Martin Sustrik
f4760f02c3
Disable timeo test on MinGW
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-20 07:35:24 +02:00
Martin Sustrik
082f8e19b7
Mailbox timeouts fixed on Windows
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-19 19:08:48 +02:00
Martin Sustrik
ed680a395e
Documentation for XPUB and XSUB socket added
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-19 16:39:27 +02:00
Martin Sustrik
9f4d3767fe
Session termination error fixed
...
When session is already terminating and reconnection happens at
that point, the session should not create new pipe to its socket.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-19 12:48:36 +02:00
Martin Sustrik
00dc0245e6
Race condition in pipe_t fixed.
...
pipe_t now correctly drops pointer to the underlying pipe when
sending pipe_term_ack command.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-19 11:17:20 +02:00
Martin Sustrik
6052709c2a
ENETDOWN is a legal error from TCP connect
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-19 09:33:01 +02:00
Martin Sustrik
5b77a41eaf
Throughput tests fixed.
...
Introduction of subscription forwarding have broken throughput tests.
This patch changes the pattern used in the tests to PUSH/PULL.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-19 09:22:11 +02:00
Martin Sustrik
4b60023b96
Merge branch 'master' of github.com:zeromq/libzmq
2011-06-19 09:15:06 +02:00
Steven McCoy
9b795de4af
Refactor Windows versioning and WinSock usage.Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
2011-06-18 20:44:03 +02:00
Martin Sustrik
dc66053530
Minor MSVC warning fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-18 20:41:21 +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
e895607ca7
ENETUNREACH is a valid error from connect
...
This patch fixed the JIRA issue 223
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-14 09:58:18 +02:00
Martin Sustrik
65d2b70312
Minor patch to fix ICC build
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-13 08:15:05 +02:00
Martin Sustrik
970798ff98
mtrie.cpp added to MSVC build
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-13 07:54:58 +02:00
Martin Sustrik
c7fb5c54b6
Reverting previous commit that broke MSVC2010 build
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-13 07:53:22 +02:00
Steven McCoy
b164023cca
Fix scope on Windows includes.
...
Fix windows.h included before winsock2.h.
Remove definition of _WINSOCKAPI_.
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
2011-06-12 19:37:11 +02:00
Martin Sustrik
ff93f54653
ZMQ_FILTER socket option added
...
This option is a performance tweak. In devices XSUB socket filters
the messages just to send them to XPUB socket which filters them
once more. Setting ZMQ_FILTER option to 0 allows to switch the
filtering in XSUB socket off.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-12 15:24:08 +02:00
Martin Sustrik
e080e3e8b6
Publisher-side filtering for multi-part messages fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-12 10:19:21 +02:00
Martin Sustrik
bd86def1c7
Actual message filtering happens in XPUB socket
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-11 20:29:56 +02:00
Martin Sustrik
3935258b82
Minor code beautification for mtrie_t
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-06-01 11:54:33 +02:00
Martin Sustrik
ee7313b4d8
Subscriptions are processed immediately in XPUB socket
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-31 16:21:17 +02:00
Martin Sustrik
a24a7c15a8
Session termination induced by socket fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-31 14:36:51 +02:00
Martin Sustrik
0b59866a84
Patches from sub-forward branch incorporated
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-30 10:07:34 +02:00
Martin Sustrik
311fb0d852
Subscription matching moved from XSUB to SUB socket
...
This patch will prevent duplicate matching in devices in the future.
Instead of matching in both XPUB and XSUB, it'll happen only
in XPUB. Receiver endpoint will still filter messages via SUB
socket.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-28 09:02:21 +02:00
Martin Sustrik
718885fdcd
Pending messages are delivered even if connection doesn't exist yet
...
Bug in previous refactoring fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-26 11:30:25 +02:00
Martin Sustrik
87a6490b39
All pipe termination code moved to pipe_t
...
Till now the code was spread over mutliple locations.
Additionally, the code was made more formally correct,
with explicit pipe state machine etc.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-25 10:25:51 +02:00
Martin Sustrik
3d4203decf
Fabien Ninoles added to the AUTHORS file
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-23 21:37:52 +02:00
Fabien Ninoles
71ac91ba41
Add multi-array support to array_item_t.
...
Allow to have the same item part of two different arrays, as long as
they are using different array identifier.
2011-05-23 21:36:00 +02:00
Martin Sustrik
0f6f7276e3
Move the pipe termination code to socket_base_t
...
So far, the pipe termination code was spread among socket type
classes, fair queuer, load balancer, etc. This patch moves
all the associated logic to a single place.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-23 20:30:01 +02:00
Martin Sustrik
acf0b0e515
Introduces bi-directional pipes
...
So far, there was a pair of unidirectional pipes between a socket
and a session (or an inproc peer). This resulted in complex
problems with half-closed states and tracking which inpipe
corresponds to which outpipe.
This patch doesn't add any functionality in itself, but is
essential for further work on features like subscription
forwarding.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-22 17:26:53 +02:00
Martin Sustrik
9e6b399256
Couple of minor issues in MSVC build fixed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-17 14:27:03 +02:00
Martin Sustrik
da7b6d0b38
Paul Colomiets added to AUTHORS file
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-17 10:13:54 +02:00
Paul Colomiets
38e5f8699c
Better handling of memory error in resolve_ip_hostname
...
Signed-off-by: Paul Colomiets <pc@gafol.net>
2011-05-17 10:12:27 +02:00
Paul Colomiets
864c18f797
zmq_msg_init_data returns ERRNO instead aborting
...
Signed-off-by: Paul Colomiets <pc@gafol.net>
2011-05-17 10:09:04 +02:00
Martin Sustrik
d8d5a627b1
Duplicate initialisation of PGM_MULTICAST_HOPS removed
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-16 10:44:38 +02:00
Martin Sustrik
5d0cffc52f
ZMQ_MULTICAST_HOPS socket option added
...
Sets the time-to-live field in every multicast packet sent from the socket.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-15 18:25:43 +02:00
Martin Sustrik
49df2f416c
Fixes warning when compiling with MSVC on Win64
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-15 13:12:09 +02:00
Martin Sustrik
49387874ef
Async connect doesn't fail on EWSANETDOWN
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-08 09:03:49 +02:00
Pieter Hintjens
da1ef4d268
Fixed REP assert on missing envelope
...
Signed-off-by: Pieter Hintjens <ph@imatix.com>
2011-05-08 09:02:47 +02:00
Martin Sustrik
0c5b781e97
urrent pipe pointer in XREP out of range -- fixed.
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-06 15:51:56 +02:00
Martin Sustrik
3ef7c747ac
Tore Halvorsen added to the AUTHORS file
...
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-05-04 12:43:23 +02:00