[zeromq-dev] peer-to-peer communication using ZMQ
Kevin Sapper
kevinsapper88 at gmail.com
Tue Aug 9 08:21:00 CEST 2016
Have a look at the zactor class of czmq (
https://github.com/zeromq/czmq#toc4-228) this should solve you problem.
2016-08-08 17:53 GMT+00:00 Yoav Agami <yoavagami at yahoo.com>:
> Hi,
>
> I am trying to implement inner process communication. The model: Part A ->
> Sends messages to Part B.
>
> I have implemented this using Client-Server example from tutorial
> (attached bellow), but facing issues that the process is "locked". What is
> the best practice to implement this kind of model?
> It is not classic "Client-Server". Actually just one part sends data to
> seconds part, and second part uses it.
>
> Is there an option to send a message with a timeout? that it will not lock
> the process?
>
> Any input / example will be very appreciated!
>
> Server:
> zmq::context_t context(1);
> zmq::socket_t socket(context, ZMQ_REP);
> socket.bind("tcp://*:5555");
> ..
> socket.recv(&request);
> socket.send(reply);
> // analyze received data
>
>
> Client:
> requester = context.socket(ZMQ.REQ);
> requester.connect("tcp://localhost:5555");
> requester.send(str.getBytes(), 0);
> byte[] reply = requester.recv(0);
>
> Thanks!
>
> _______________________________________________
> 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/20160809/4f1a77c6/attachment.htm>
More information about the zeromq-dev
mailing list