[zeromq-dev] Attempt to proxying CURVE with a new NOP mechanism and surrogate feature still fails

Laurent Alebarde l.alebarde at free.fr
Thu Dec 5 18:38:40 CET 2013

Sorry, in "test_surrogate_curve.cpp", the schema is:

Client (DEALER, CURVE) --------- (NOP, *DEALER*) Proxy (*DEALER*, NOP) 
------------ (CURVE, DEALER) Worker

Which is possible since we have only one client and one worker. The 
advantage to use DEALER is to have a very simple code, what we want for 
a test. A real application would need a ROUTER/ROUTER proxy with 
client/worker pairing so that the curve handcheck is fully performed, 
along with the forthcoming messages, with the same worker.

Le 05/12/2013 18:34, Laurent Alebarde a écrit :
> Hi Devs,
> In my attempts to proxy CURVE while sticking to ZMTP, I have failed 
> until now. I still think it is possible, but I cannot afford spending 
> more time on it. If someone can go on, you are welcome.
> Everything is in one commit here - the code is simple : 
> https://github.com/lalebarde/libzmq/commit/8e321dde5a96b9ce185ab1016adcf42b4f233257#commitcomment-4783956
> For that purpose, I have created a NOP mechanism, with no handcheck 
> and intended for the proxy, plus a surrogate feature that enables a 
> socket to build its mechanism on what it has been configured for 
> instead of on the peer's greeting, and to send a greeting mechanism 
> different from the configured one. In other words, the surrogate 
> feature makes it possible to avoid any mechanism transaction.
> The test "test_surrogate_curve.cpp" fails to proxy CURVE via a NOP proxy:
> Client (DEALER, CURVE) --------- (NOP, ROUTER) Proxy (ROUTER, NOP) 
> ------------ (CURVE, DEALER) Worker
> What happens is that the curve_client_t object DTORs just after having 
> sent the HELLO command. At least, if I change CURVE to NOP in the 
> client and worker, the test passes, either with use of surrogation 
> with any mechanism or not using surrogation at all.
> I remain available for any question. Following Pieter advices, I am 
> going to try another way, with a ZMQ_STREAM proxy.
> Cheers,
> Laurent.
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20131205/879762dc/attachment.htm>

More information about the zeromq-dev mailing list