nanomsg/mangos-v1

Dial could be synchronous

gdamore opened this issue · 3 comments

See #281 for an example of the common confusion.

It Dial method (and possibly part of the Listen method) should be synchronous, at least the first dial attempt -- in order to report obvious errors to clients (such as an attempt to connect to a server when no such server is present, or getting the wrong IP address...)

We should look at either an option, or some other function, that can give synchronous semantics for the first connection request. We've done that in nng, btw.

We might also want to check to make sure that Listen at least does the bind() synchronously. (Obviously accept() needs to be asynchronous.)

I did this in mangos v2 -- as of yesterday.

I may close this in mangos v1 as I probably will not change this in v1. (It's a breaking semantic change.)

This is done for mangos v2, and its no longer experimental.