0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-28 16:15:23 +08:00

3140 Commits

Author SHA1 Message Date
Pieter Hintjens
046e37e907 Test for 127.0.0.1 at tests startup 2014-01-29 20:16:58 +01:00
Martin Hurton
de96d65f15 Merge pull request #862 from hintjens/master
Fixed man page for zmq_proxy_hook
2014-01-29 06:34:13 -08:00
Pieter Hintjens
fa318400dc Fixed man page for zmq_proxy_hook
- spaces instead of tabs for indentation
- fixed levels under EXAMPLE USAGE
- added to Makefile.am
2014-01-29 15:15:29 +01:00
Martin Hurton
e45fddc2bc Merge pull request #861 from pavel-pimenov/master
[libzmq] const string p -> const string& p (#860)
2014-01-29 05:59:52 -08:00
Pavel Pimenov
5dd82a6fa6 [libzmq] const string p -> const string& p (#860) 2014-01-29 15:58:53 +04:00
Pieter Hintjens
e436073b37 Merge pull request #858 from lalebarde/master
add proxy_chain, a multi proxies chaining in the same thread feature
2014-01-28 11:30:42 -08:00
Laurent Alebarde
bc7441f517 add proxy_chain, a multi proxies chaining in the same thread feature 2014-01-28 18:15:01 +01:00
Ian Barber
fcd9b9506a Merge pull request #855 from hintjens/master
Man page fixes
2014-01-26 06:22:10 -08:00
Pieter Hintjens
b1aba5dc30 Fixed example for zmq_msg_copy 2014-01-24 12:07:46 -06:00
Pieter Hintjens
62ac5bb77f Fixed type for ZMQ_RCVMORE getsockopt example 2014-01-24 12:07:46 -06:00
Pieter Hintjens
188e99c0d4 Merge pull request #854 from lalebarde/master
add a proxy hook
2014-01-24 09:57:46 -08:00
Laurent Alebarde
9ae6a91fad add a proxy hook 2014-01-24 16:52:30 +01:00
Martin Hurton
a7065519df Merge pull request #852 from hintjens/master
Fixes to test cases
2014-01-23 08:23:23 -08:00
Pieter Hintjens
9c228e9374 Fixes to test cases
- renamed test_stream_disconnect_notifications (too long!)
- removed print statements in that test case
- fixed Makefile.am for test_zap_ipc_creds (was not building)
2014-01-23 09:23:46 -06:00
Pieter Hintjens
8fea78b130 Merge pull request #849 from pijyoi/master
typo fix: RECVHWM -> RCVHWM
2014-01-22 05:24:34 -08:00
KIU Shueng Chuan
e71dfd13d7 typo fix: RECVHWM -> RCVHWM 2014-01-22 08:40:35 +08:00
Pieter Hintjens
9c6aa1e9e0 Merge pull request #848 from Prarrot/master
Changed fail behavior of CONNECT_RID to an assert failure instead of silent failure.
2014-01-21 12:08:00 -08:00
Tim M
188e76a73f Added asserts on socket close in test_conenct_rid. 2014-01-21 11:49:41 -08:00
Tim M
515af9b147 Added assert on duplicate id in ROUTER and STREAM sockets. Updated man to reflect this change. Modified test case to match. 2014-01-21 11:43:34 -08:00
Tim M
141e1b5966 Cleaned up formatting of test_connect_rid. Set LINGER to 0 on sockets. This may address the test failing on some devices. 2014-01-21 11:24:39 -08:00
Pieter Hintjens
14c6cba2a5 Merge pull request #846 from lalebarde/master
factorize code in proxy
2014-01-21 02:14:34 -08:00
Pieter Hintjens
660247066f Merge pull request #847 from Prarrot/master
Added test_connect_rid
2014-01-21 02:12:30 -08:00
Tim M
2d6d8af0b8 added space at end of file 2014-01-20 12:26:26 -08:00
Tim M
2b0fe6d181 Updated AUTHORS 2014-01-20 12:23:48 -08:00
Tim M
7279429cf1 tabs to spaces 2014-01-20 12:21:07 -08:00
Tim M
de1164255a added test_connect_rid file and added to CMakeLists again. 2014-01-20 12:18:04 -08:00
Laurent Alebarde
5bc6737039 factorize code in proxy 2014-01-20 17:00:02 +01:00
Pieter Hintjens
0e94ddf377 Merge pull request #842 from ipechorin/master
Fix compilation of tests on MSVC 2008
2014-01-20 03:40:46 -08:00
Ivan Pechorin
ebb51d7922 Fix CMake tests - delete non-existing test_connect_rid 2014-01-20 21:03:45 +13:00
Ivan Pechorin
1d7a07d919 Fix compilation of tests on MSVC 2008 2014-01-20 20:55:32 +13:00
Pieter Hintjens
aaeae8deb3 Merge pull request #841 from Prarrot/master
ZMQ_CONNECT_RID tests and man
2014-01-19 19:37:13 -08:00
Tim M
3fbc10eba7 Updated man entries, and added behavior in case the user duplicates peer ids. In this case the socket reverts to default behavior. 2014-01-19 17:28:13 -08:00
Tim M
1d9b76c860 Added test for ZMQ_CONNECT_RID 2014-01-19 15:59:43 -08:00
Tim M
2f36f65f8f Fixed duplicate variable declaration. 2014-01-19 15:05:20 -08:00
Ian Barber
2f85447273 Merge pull request #839 from hintjens/master
Cleaned up option to force identity on outgoing connection
2014-01-19 01:38:05 -08:00
Pieter Hintjens
50bd28c037 Cleaned up option to force identity on outgoing connection
- renamed to ZMQ_CONNECT_RID
- fixed whitespace malformating around previous patch
- renamamed next_peer_id to next_rid in preparation for
  larger rename of IDENTITY to ROUTING_ID

Note: ZMQ_CONNECT_RID has no test case and no entry in the man
page, as yet.
2014-01-19 09:27:57 +01:00
Pieter Hintjens
5f07d103a7 Merge pull request #838 from Prarrot/master
Fixed compile issue with missing member of socket_base.  Changed ZMQ_NEX...
2014-01-19 00:09:15 -08:00
Pieter Hintjens
cedca84196 Merge pull request #837 from arsenm/master
Fix cmake build and warnings
2014-01-19 00:08:05 -08:00
Tim M
b1920bdf90 Fixed compile issue with missing member of socket_base. Changed ZMQ_NEXT_IDENTITY to ZMQ_NEXT_CONNECT_PEER_ID.
Fixed case where ZMQ_NEXT_CONNECT_PEER_ID is used in ROUTER, and ROUTER does not read the identity message from the connected pipe.
2014-01-18 17:49:54 -08:00
Matt Arsenault
00aeaddf94 Fix unused parameter and variable warnings. 2014-01-18 13:17:29 -08:00
Matt Arsenault
5a230f7d9e Fix cmake configure error from deleted test. 2014-01-18 12:59:12 -08:00
Pieter Hintjens
d82389a788 Merge pull request #834 from Prarrot/master
Updated STREAM and ROUTER sockets to allow for pre-naming of outbound connections
2014-01-17 23:13:07 -08:00
Pieter Hintjens
a66c47f995 Merge pull request #833 from mrvn/pull_store-fd-on-connect
Store socket FD after connect
2014-01-17 23:11:45 -08:00
Pieter Hintjens
d13b74e955 Merge pull request #832 from mrvn/pull_stream-connect-notification
Add STREAM connect notification.
2014-01-17 23:11:27 -08:00
Tim M
f13512a926 fixed define value in header 2014-01-17 14:41:45 -08:00
Tim M
5d4860ea12 Both STREAM and ROUTER sockets suffer from a naming problem on outbound connections. While these connections can be created, they can't be immediately used. Traffic must be received before it can be sent. This prevents practical, minimal usage of STREAM or ROUTER as a true N fan in/out socket.
This change simply provides the user with a socket option that sets a user defined name of the next outbound connection:

zmq_setsockopt(routerSock,ZMQ_NEXT_IDENTITY,"myname",6);
if(0 > zmq_connect(routerSock,"tcp://127.0.0.1:1234")) return 1;
ret = zmq_send(routerSock,"myname",6,ZMQ_SNDMORE);
zmq_send(routerSock,b.mem,b.used,0);

In this example, the socket is immediately given the name "myname", and is capable of immediately sending traffic.

This approach is more effective in three ways:
1) It prevents all sorts of malicious peer naming attacks that can cause undefined behavior in existing ROUTER connections. (Two connections are made that both transmit the same name to the ROUTER, the ROUTER behavior is undefined)
2) It allows immediate control of connections made to external parties for STREAM sockets. Something that is not possible right now. Before an outbound connection had no name for STREAM or ROUTER sockets because outbound connections cannot be sent to without first receiving traffic.
3) It is simpler and more general than expecting two ROUTER sockets to handshake on assigned connection names. Plus it allows inline sending to new connections on ROUTER.
2014-01-17 14:34:39 -08:00
Goswin von Brederlow
afb24b53e6 Add STREAM connect notification.
Adjust test cases to connection notification.
Increase error checking in test cases.
2014-01-17 23:31:51 +01:00
Goswin von Brederlow
92f8f244e2 Store socket FD after connect 2014-01-17 23:30:17 +01:00
Richard Newton
53d0199e50 Merge pull request #828 from snikulov/cmake_rc_merge_fix
fixed cmake merge related to version.rc.in handling
2014-01-16 05:25:58 -08:00
Sergei Nikulov
f4a67b2520 fixed cmake merge related to version.rc.in handling 2014-01-16 16:29:12 +04:00