Commit Graph

53 Commits

Author SHA1 Message Date
shripchenko
627190c8be another iteration on ZMQ_PROBE_ROUTER
now it properly works for ROUTER
2013-06-10 02:31:00 -07:00
Martin Hurton
c3e40736de Rename terminated->pipe_terminated 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
shripchenko
97324398a7 refactored ZMQ_ROUTER_ANNOUNCE_SELF code. renamed it to ZMQ_PROBE_NEW_PEERS.
implement it for DEALER tocket.
+documentation
2013-06-05 15:29:40 +02:00
Pieter Hintjens
240eff384a Merge pull request #563 from shripchenko/master
Refactoring of 'ZMQ_ROUTER_ANNOUNCE_SELF'
2013-05-29 09:03:54 -07:00
shripchenko
f805e4dd03 changed option name. +documentation changes 2013-05-24 07:09:53 -07:00
shripchenko
aec989fb5d small refactoring 2013-05-23 02:02:18 -07:00
shripchenko
51750a7d2a refactored ZMQ_ROUTER_ANNOUNCE_SELF code. renamed it to ZMQ_PROBE_NEW_PEERS.
implement it for DEALER tocket.
+documentation
2013-05-23 01:49:40 -07:00
Martin Hurton
f781eb7e7b Merge pull request #562 from hintjens/master
Removed tracing on router option setting
2013-05-22 07:05:20 -07:00
Pieter Hintjens
fbd1729cbd Removed tracing for Travis builds 2013-05-22 00:17:03 +02:00
shripchenko
ed3a115da9 Add ROUTER socket option to introduce self(send an empty message) to new peers, to allow ROUTER<->ROUTER auto-discovery problem. 2013-05-21 10:25:21 -07:00
Pieter Hintjens
4112693051 Cleaned up router option code
- made consistent with options.cpp code
- added trace print for ongoing issue with Travis CI builds
2013-05-21 15:15:16 +02:00
Pieter Hintjens
0e77d65f12 Removed pointless comment 2013-03-12 16:15:54 +01:00
Pieter Hintjens
f0f16505e5 Removed corporate advertisements from source file headers
Copyrights had become ads for Sustrik's corporate sponsors, going against the original
agreement to share copyrights with the community (that agreement was: one line stating
iMatix copyright + one reference to AUTHORS file). The proliferation of corporate ads
is also unfair to the many individual authors. I've removed ALL corporate title from
the source files so the copyright statements can now be centralized in AUTHORS and
source files can be properly updated on an annual basis.
2013-03-12 13:24:57 +01:00
Sébastien Rombauts
927000fe2f Fixed 7 MSVC2008 Compiler Warning (level 3) C4800: 'const int' : forcing value to bool 'true' or 'false' (performance warning)
- added explicit test "(xxx != 0)" to get a "bool" value out of the "int" expression
- see the MSDN recommandation http://msdn.microsoft.com/en-us/library/b6801kcy(v=vs.90).aspx
2013-02-19 14:27:14 +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)
394d755cf3 return EHOSTUNREACH at full only when mandatory is set 2012-12-09 16:52:45 +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
Martin Hurton
66dc4d8b54 Don't pass flags to xrecv method 2012-11-09 17:18:14 +01:00
Martin Hurton
7865f96e97 Don't pass flags to xsend method 2012-11-09 17:18:10 +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
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
Pieter Hintjens
4ba34c9d70 Whitespace and style fixes 2012-10-24 09:18:52 +09:00
Pieter Hintjens
a3889d00c3 Fixed issue #451 2012-10-19 15:09:52 +09:00
Pieter Hintjens
983ee761b1 Renamed ZMQ_ROUTER_BEHAVIOR to ZMQ_ROUTER_MANDATORY for clarity 2012-10-08 16:36:35 +09:00
Arthur O'Dwyer
3b984d40e9 Silence all "unused parameter" warnings from Clang.
Compiling without warnings is a good goal, because it makes
new warnings (which probably indicate bugs) stand out rather
than getting lost in the spam.

My fixes fall into two categories:

    - Adding (void) casts of unused parameters, where their
      unusedness seems like a TODO (or in some cases a bug?).

    - Removing parameter names altogether, where the function
      is clearly a stub that will never use its parameters.

Should be no change in behavior.
2012-08-27 16:05:51 -07:00
Martin Hurton
1ab85f471a Exchange greeting messages for all socket types
Fixes #415.
2012-08-11 19:04:49 +02:00
Martin Hurton
9fab9937e5 Fix issue #406
When a peer reconnects, the router socket receives an identity
message containing this peer id. When this happens, the current
implementation crashes.

This patch makes a router socket to silently ignore all identity
messages coming from reconnected peers.
2012-07-31 18:59:13 +02:00
Martin Hurton
6ac5cf8697 Simplify code for writer activation in Router socket 2012-07-11 15:15:04 +02:00
Kobolog
829d0003be Verbose ROUTER socket behavior patch 2012-06-17 02:33:43 +04:00
Martin Hurton
a8f9a0d891 Use zmq_assert rather then assert 2012-05-27 15:31:59 +02:00
Martin Hurton
2cbf7993dc fq: remove unused parameter
The recv function accepted flags parameter but this was unused.
2012-04-26 13:21:25 +02:00
Pieter Hintjens
a969028977 Merge pull request #302 from hurtonm/router_bugfix
Fix error in router socket introduced in the previous commit
2012-04-03 00:34:21 -07:00
Martin Hurton
9a60b3a2a1 Fix error in router socket introduced in the previous commit 2012-04-03 09:29:33 +02:00
Ian Barber
2faedd9e08 Merge pull request #300 from hurtonm/router_send_fixes
router: always respect message boundaries
2012-04-02 13:23:52 -07:00
Martin Hurton
600488fa9c router: always respect message boundaries
The current implementaion of router socket does not
handle the full pipe and unroutable messages properly.
Namely, in those cases, the socket could route some
message parts into a wrong connection.
2012-04-02 21:07:32 +02:00
Martin Hurton
f037290dc3 router: reimplement peer identification
The new implementation allows one to send messages through
a router socket to a peer even before receiving
messages from this peer.

Fixes issue #304
2012-04-02 20:45:10 +02:00
Ian Barber
cecc790ca3 Merge pull request #297 from hurtonm/code_cleanup
Code cleanup
2012-03-28 03:51:13 -07:00
Martin Hurton
1e2564a55f Fix return value of send for router socket 2012-03-28 07:45:57 +02:00
Martin Hurton
6f47f1281b Do not pass a message to the check_write method
The check_write method does not use the passed message.
The parameter was needed to implement the swap.
As the swap is not supported anymore, it is safe to remove this parameter.
2012-03-28 07:28:42 +02:00
Pieter Hintjens
82c06e4417 Fixed issue #325 2012-03-23 17:29:29 -05:00
Pieter Hintjens
c12fedc70a Completed internal renaming of XREP/XREQ to ROUTER/DEALER 2012-03-22 11:36:19 -05:00
Martin Sustrik
dee8b2360a New style ROUTER socket removed.
Signed-off-by: Martin Sustrik <sustrik@turist.(none)>
2011-10-31 15:44:42 +01:00
Jon Dyte
34b114d15d Make sure new ROUTER socket honours POLLIN for cmd messages
Signed-off-by: Jon Dyte <jon@totient.co.uk>
2011-09-29 09:07:03 +02:00
Martin Sustrik
8485a5e5a4 Assert fixed in XREP & ROUTER when sending to terminating pipe (issue 258)
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-28 08:03:14 +02:00
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
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