[zeromq-dev] Connecting to a different socket after connecting and sending messages to one socket?
Praveen Baratam
praveen.baratam at gmail.com
Sat Nov 20 22:14:30 CET 2010
Hello Martin,
Thats exactly what I am interested in...
zmq_connect (s, ...);
zmq_recv (s, ...);
zmq_connect (s, ...);
May be we should run an experiment and see....
Regards,
Praveen
On Sat, Nov 20, 2010 at 11:02 PM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> Praveen,
>
> > My doubt is not about the architecture needed but in regard to any
> > ZMQ socket in general. Can a ZMQ socket be connected to a new end
> > point after it has started receiving messages from prior connected
> > sockets. For example can a SUB socket connect to a new PUB socket
> > apart from the PUB sockets its already connected, especially after
> > receiving some messages from the prior connected PUB SOCKETS?
> >
> >
> > With the current APIs this is not possible. But 0MQ sockets are
> > lightweight, so why not just create a new one for the new peer?
>
> It should be possible to do something like:
>
>
> zmq_connect (s, ...);
> zmq_recv (s, ...);
> zmq_connect (s, ...);
>
> However, the new connect doesn't cancel the previous one. So you'll end
> up with a SUB socket connected to tho PUB sockets.
>
> Martin
> _______________________________________________
> 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/20101121/578aaab8/attachment.htm>
More information about the zeromq-dev
mailing list