This was certainly our intention. I'm not sure the code does that type
checking yet, but the protocol supports it.

However, it's not as simple as it sounds, since connections are
background actions and invisible to applications. So connection
failures are too. We have the same issue with security, and the
current answer is to simply deny the connection, as if there was no
network connection. But this won't help users debug problems. I'm not
a fan of having to do extra work (context monitoring) to catch such
errors.

Perhaps the better approach is to raise a fatal error on the socket so
all further operations on it fail, after a socket type error, or a
security failure. The error would happen asynchronously, but would at
least show on the radar without extra work.

-Pieter





On Thu, Sep 19, 2013 at 11:34 AM, Charles Remes <[email protected]> wrote:
> Will the upcoming version 4 release enforce proper socket pairings so that 
> doing something odd like connecting PUSH and SUB will raise an error?
>
> cr
>
> On Sep 19, 2013, at 2:46 AM, Pieter Hintjens <[email protected]> wrote:
>
>> You can't connect a PUSH to a SUB; use a PUB socket to send the data.
>
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to