Ian Barber
f4c51db842
Fix small streamengine issue w/ term and handshake
...
Also tidy up monitor test a little.
2013-06-22 10:58:16 +01:00
Martin Hurton
8af208fab7
Implement ZMTP/3.0 CURVE mechanism
2013-06-22 11:48:44 +02:00
Martin Hurton
e4a211870c
Implement CurveZMQ message encryption and authentication
2013-06-22 11:46:40 +02:00
Martin Hurton
c9638fceb4
Merge pull request #581 from hintjens/master
...
Problem: code isn't setting mechanism to CURVE properly
2013-06-22 02:12:39 -07:00
Pieter Hintjens
8c0ded5076
Properly set mechanism to CURVE when setting a curve option
2013-06-22 11:05:01 +02:00
Martin Hurton
20a7978d67
Stop ZMTP handshake when an unexpected message comes
2013-06-22 08:12:11 +02:00
Ian Barber
cabf4e658f
Comments to clarify the socket name function
2013-06-21 16:56:45 +01:00
Ian Barber
1fe7820629
Merge pull request #577 from hintjens/master
...
API for CURVE configuration
2013-06-20 11:09:20 -07:00
Gonzalo Diethelm
3b355fec9a
Introduced private constants for the context sanity tag values.
...
Ignored more MSVC intermmediate files.
2013-06-20 12:43:32 -04:00
Pieter Hintjens
d9bb16725e
Added options for CURVE security
...
- ZMQ_CURVE_PUBLICKEY for clients and servers
- ZMQ_CURVE_SECRETKEY for clients
- ZMQ_CURVE_SERVERKEY for clients
- ZMQ_CURVE_SERVER for servers
- added tools/curve_keygen.c as example
- updated man pages
2013-06-20 18:09:12 +02:00
Martin Hurton
37b99c0b4b
Implement ZMTP/3.0 CURVE handshake
2013-06-20 13:36:12 +02:00
xinchuan
38327927ce
fix memory leak in tempnam() usage
2013-06-15 16:11:50 +08:00
shripchenko
627190c8be
another iteration on ZMQ_PROBE_ROUTER
...
now it properly works for ROUTER
2013-06-10 02:31:00 -07:00
Pieter Hintjens
6ff51ee909
Updated ZAP request for changed protocol draft
...
- username and password sent as two string frames
- fixed test case to match
2013-06-07 15:50:36 +02:00
Martin Hurton
2928c91a6d
Implement ZAP and integrate it with PLAIN mechanism
2013-06-06 13:28:21 +02:00
Martin Hurton
4e47084dd4
Minor cleanups
2013-06-06 13:28:21 +02: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
Josh Gao
43d049741f
Fix mistaken use of xor in "2^31 - 1".
2013-05-31 15:54:01 -07:00
Ian Barber
9a0b2c8970
Pieter's change to fix memory leak on mechanism
2013-05-29 21:58:20 +01: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
Martin Hurton
4e4803e07f
Rename pipe states to make it more mnemonic
2013-05-28 13:45:20 +02: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
31ee92f2fd
stdint.h is not available on all platforms
2013-05-19 10:01:33 +01:00
Pieter Hintjens
73562112b8
Whitespace fixes
2013-05-18 11:53:20 +01:00
Pieter Hintjens
f909b9c722
plain_mechanism now uses options.as_server
...
- we need to switch to PLAIN according to options.mechanism
- we need to catch case when both peers are as-server (or neither is)
- and to use username/password from options, for client
2013-05-17 17:21:59 +01:00
Martin Hurton
182a224bb0
Use socket options to select security mechanism
2013-05-17 15:49:59 +02:00
Pieter Hintjens
e1f797b048
Added configuration for PLAIN security
...
* ZMQ_PLAIN_SERVER, ZMQ_PLAIN_USERNAME, ZMQ_PLAIN_PASSWORD options
* Man page changes to zmq_setsockopt and zmq_getsockopt
* Man pages for ZMQ_NULL, ZMQ_PLAIN, and ZMQ_CURVE
* Test program test_security
2013-05-15 17:55:21 +02:00
Martin Hurton
4eecda8af3
Implement ZMTP/3.0 PLAIN mechanism
...
This implements protocol handshake.
We still need to design and implement 1) API changes so a user
can set username and password, and 2) a mechanism for engine
to authenticate users.
2013-05-14 11:20:13 +02:00
Martin Hurton
d47295db70
Abstract security mechanism
2013-05-14 10:52:52 +02:00
Martin Hurton
cd4d8bb15a
Implement ZMTP/3.0 NULL mechanism
2013-04-28 14:13:40 +02:00
Jon Dyte
56ead84490
Experimental function zmq_recviov doesnt work correctly in a couple of cases
...
1) VSM - you cannot hand out the 'data' address as it was not allocated on the heap
2) for other messages the 'data' address cannot be handed out either, as it not the address
originally returned by malloc and hence cannot be passed to 'free'.
see msg.cpp
u.lmsg.content = (content_t*) malloc (sizeof (content_t) + size_);
....
u.lmsg.content->data = u.lmsg.content + 1;
So the function is changed to always malloc a data buffer and copy the data into it.
There is a possible optimisation using memmove for the non-VSM case but that is not done yet.
2013-04-25 21:58:26 +01:00
Lourens Naudé
b5e5e10126
Fix return code redeclaration for platforms with SO_NOSIGPIPE
2013-04-23 23:01:14 +01:00
Pieter Hintjens
710f38f1cc
Fixed syntax error
2013-04-22 15:12:53 +02:00
Pieter Hintjens
f4dbccd4fb
Fix for LIBZMQ-526
2013-04-22 14:51:09 +02:00
Pieter Hintjens
f0cf4095b5
Fixed issue #525 - multipart upstreaming from xsub to xpub
2013-04-18 17:23:57 +02:00
Martin Hurton
e52c436252
Interoperate with higher versions of ZMTP protocol
2013-04-14 22:59:50 +02:00
Steven McCoy
d079190efa
[#LIBZMQ-446] Silence error on setting PGM_TOS due to some platforms raising an error at runtime. Noted are RHEL 4.
2013-04-12 23:55:04 -04:00
Martin Hurton
9d79ac2830
Use state functions for message flow
...
The patch makes the code somewhat simpler and prepares it for
more complex initialization handshakes.
2013-04-12 15:49:08 +02:00
Martin Hurton
7942db7606
Refactor code so that messages go through engines
2013-04-11 18:52:51 +02:00
Ken Steele
3286bf5ab6
On the Tile architecture, use atomic instructions for atomic ptr and counter.
...
For atomic_counter and atomic_ptr classes, detect the Tile architecture
using #if defined __tile__ matching ARM and Solaris and then use the
Tile atomic instructions. Without this change, the default Mutex
implementation is used, which is slower.
2013-03-20 12:54:38 -04:00
Mika Fischer
03c28411d8
Work around for LIBZMQ-496
...
The problem is that other threads might still be in mailbox::send() when
it is destroyed. So as a workaround, we just acquire the mutex in the
destructor. Therefore the running send will finish before the mailbox is
destroyed.
See also the fix for LIBZMQ-281 in zeromq2-x.
Signed-off-by: Mika Fischer <mika.fischer@zoopnet.de>
2013-03-18 10:20:08 +01:00
Martin Hurton
81818401e8
Update PGM with recent changes
2013-03-18 02:14:20 +01:00
Pieter Hintjens
0e77d65f12
Removed pointless comment
2013-03-12 16:15:54 +01:00
Pieter Hintjens
8358d4e832
Renamed ZMQ_DELAY_ATTACH_ON_CONNECT_COULD_THIS_BE_ANY_LONGER to ZMQ_IMMEDIATE
2013-03-12 16:11:19 +01:00
Pieter Hintjens
12c7db8c42
Code name clean up
2013-03-12 15:56:10 +01:00
Pieter Hintjens
d826c53b9b
Bumped ZMTP revision to 2
...
* Starting draft ZMTP/2.1 protocol (revision 2)
* Basis for adding security to the wire protocol
* Maintains backward compatibility
2013-03-12 15:49:23 +01:00
Pieter Hintjens
785ef41f67
Refactored codecs to match ZMTP version numbers
2013-03-12 15:29:37 +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
Guido Goldstein
b0b8ab27c5
Changed message structure for event notifications.
2013-03-08 13:48:18 +01:00
Guido Goldstein
21eeb03b6c
Simplified the zmq_event_t structure for easier access and better usability towards language bindings.
2013-03-08 10:34:25 +01:00
Duane Littleton
1e52a451d6
Windows: Fix rounding error when calculating now_us
...
Improve accuracy of time calculations and avoid division by zero when
ticksPerSecond.QuadPart < 1000000.
2013-02-27 13:53:07 -05:00
Ian Barber
897023c3c1
Merge pull request #518 from hintjens/master
...
Fixed MAXMSGSIZE setsockopt, which I'd broken
2013-02-20 11:44:22 -08:00
Pieter Hintjens
a85c9f45d1
MAXMSGSIZE broke when I cleaned up this code - fixed
2013-02-20 14:05:55 +01:00
Sébastien Rombauts
57f84d6811
Windows CE support : some more #if !defined _WIN32_WCE
...
- Windows CE does not manage security attributes (no SetSecurityDescriptorDacl(), SetEvent (NULL, xxx) ...)
- Windows CE does not inheritance of sockets for child process (SetHandleInformation ((HANDLE) *w_, HANDLE_FLAG_INHERIT...)
- see comments about story "Porting ZeroMQ to Windows Mobile" on webpage http://www.zeromq.org/story:5
2013-02-19 18:57:12 +01:00
Sébastien Rombauts
41d79bc19e
Windows CE support : using standard _WIN32_WCE flag instead of WINCE
...
- when compiling for Windows CE, a C++ project must define the preprocessor definitions: UNDER_CE=$(CEVersion),_WIN32_WCE=$(CEVersion)
- choosing the "_WIN32_CE" form for uniformization with "_WIN32" and "_WIN32_WINNT" already used in libzmq (boost is using both forms)
- see http://msdn.microsoft.com/en-us/library/ee479161(v=winembedded.60).aspx
2013-02-19 16:49:23 +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
KIU Shueng Chuan
8c71ac47e8
release critical section on failure to create signaler fdpair
2013-02-15 10:45:43 +08:00
Min(Dongmin Yu)
2c1a3c55f7
LIBZMQ-497 there could be unsent bytes in encoder
...
When we send a large message, the message can be splitted into two chunks.
One is in the encoder buffer and the other is the zero-copy pointer.
The session could get the term before the last chunk is sent.
2013-02-01 17:32:28 +09:00
Pieter Hintjens
8ab3c4a1bf
Fixed issue #500
2013-01-31 21:52:30 +01:00
Pieter Hintjens
309740e197
Fixed issue #499
2013-01-31 20:47:45 +01:00
Pieter Hintjens
18a14aedea
Added ZMQ_IPV6 option, cleaned up setsockopt code, it was nasty
2013-01-30 23:53:09 +01:00
Bjorn Topel
f1e77f2246
Removed heap allocation for in zmq_poll for small item sets
...
Until now, zmq_poll always allocates the poll items on the heap.
Now, small item sets, up to ZMQ_POLLITEMS_DFLT, are stack allocated
and only larger sets are allocated on the heap.
2013-01-30 16:46:45 +01:00
Pieter Hintjens
e8cbfac966
Merge pull request #503 from chazmcgarvey/define-dummy-eproto
...
define a dummy EPROTO for platforms that don't use it
2013-01-23 11:55:48 -08:00
Charles McGarvey
ba3e18f700
define a dummy EPROTO for platforms that don't use it
...
This accomplishes the same thing as 2e2ef7fd in a potentially cleaner way.
2013-01-21 17:14:26 -07:00
Ian Barber
d850272417
Add size check on XSUB message sends
...
Ensures 0 length messages aren't being checked for subscribtion status on whatever data happens to be following the data pointer.
2013-01-21 16:11:27 -08:00
Charles McGarvey
2e2ef7fd33
do not use EPROTO on platforms that do not have it
2013-01-21 15:00:55 -07:00
MinRK
edd43e1ca4
deprecate zmq_ctx_destroy in favor of zmq_ctx_term
...
in order to avoid logical collisions with pre-existing notions of context destruction in bindings (czmq, pyzmq).
2013-01-17 15:48:18 -08:00
Pieter Hintjens
a4bedc5255
Whitespace and comment fixes
2013-01-08 09:16:50 +01:00
Pieter Hintjens
ef186fe15b
Spelling fixes
2013-01-08 09:08:01 +01:00
John Muehlhausen
d32e392278
allow XSUB/XPUB to send/recv messages unrelated to sub/unsub (LIBZMQ-490)
...
zmq::xpub_t::xread_activated() – change to process messages without 0
or 1 prefix, but without affecting subscriptions
zmq::xsub_t::xsend() – change to send rather than discard messages
without 0 or 1 prefix, but without affecting subscriptions
Update documentation
2013-01-07 22:24:24 -06:00
Pieter Hintjens
949d157897
Merge pull request #492 from arsenm/master
...
Make CMake build usable for other systems
2013-01-02 00:32:15 -08:00
Matt Arsenault
6ce464414b
Fix typos
2013-01-02 03:24:11 -05:00
Matt Arsenault
f770954d30
Fix a couple more warnings
2013-01-02 03:24:11 -05:00
Matt Arsenault
6ecb796e77
Fix warnings with MinGW
2013-01-02 03:24:11 -05:00
Matt Arsenault
1ffc5d11dc
Fix some of the -Wshadows
2013-01-02 03:24:11 -05:00
Matt Arsenault
14d3245e02
Fix -Wmismatched-tags
2013-01-02 03:24:11 -05:00
Matt Arsenault
edb5a05add
Fix -Wmissing-field-initializers
2013-01-02 03:24:11 -05:00
Matt Arsenault
3ebab09ce4
Fix unused argument warnings
2013-01-02 03:24:11 -05:00
Matt Arsenault
f3901b35d4
Comments about ICC build failure with 12.x were crazy
...
Fix warnings with ICC.
2013-01-02 03:24:10 -05:00
Matt Arsenault
0362c310a5
First pass at getting cmake build to work with non-Windows systems.
...
Make doc building option dependent on asciidoc being installed
Fix MSVC build requiring cygwin.
Don't use try_run to get the version
2013-01-02 03:24:10 -05:00
Matt Arsenault
73c370dd17
Fix inconsistently using #if or #ifdef instead of #if defined
2013-01-02 03:24:10 -05:00
KIU Shueng Chuan
151a80619b
set SO_LINGER on first signaler socket to close in order to avoid
...
TIME_WAIT state.
2012-12-29 18:05:15 +08:00
KIU Shueng Chuan
322808be9c
eliminate code moved into zmq_utils.cpp
2012-12-29 13:21:50 +08:00
KIU Shueng Chuan
942c654d1c
win32: close zmq-signaler-port-sync event object to avoid handle leak
2012-12-27 21:31:12 +08: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
Stefan Radomski
21345ffa50
Break early when pipe to be removed was found
2012-12-04 17:40:43 +01:00
Stefan Radomski
f9770e93ef
Fixed iterator when erasing from inprocs multimap
2012-12-04 17:31:46 +01:00
Stefan Radomski
624dd1e5b5
Removal of terminated pipes from inproc and ignoring peer ends
2012-12-04 17:10:32 +01:00
Stefan Radomski
66c22456b9
Close pipes for inproc sockets on zmq_disconnect
...
- fixes LIBZMQ-476 and LIBZMQ-475
2012-12-04 15:14:21 +01:00
Victor Perron
3fc8c7073d
Same fix, in-line style
2012-11-30 22:16:20 +01:00