[zeromq-dev] Reading queued messages after disconnect

Pieter Hintjens ph at imatix.com
Wed Jan 1 22:36:23 CET 2014


I'm not sure you can have unreceived messages pending if the socket
has no binds or connects. A blocking recv() would simply never return
until the context is shutdown or the process interrupted.

On Wed, Jan 1, 2014 at 10:06 PM, Gregg Irwin <gregg at pointillistic.com> wrote:
> PH> The behavior should be fixed at the libzmq level IMO, and documented.
> PH> I'd suggest that reading from a socket that was neither bound nor
> PH> connected is an error, and should perhaps even assert. Or at least
> PH> return an ENOTCONN error.
>
> Including the case where there are unreceived messages pending?
>
> -- Gregg
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev



More information about the zeromq-dev mailing list