iOS 10.3 and macOS 10.12

When issuing connect(2) and then select(2) on a non-blocking socket, is one 
expected to issue a second connect() call after the select() returns a 1? 

My code works except when there is nothing listening on the port of the 
specified server ip address.  The pre-select() connect() call returns 
EINPROGRESS 'Operation now in progress', and the select() call itself returns a 
1 instead of a timeout or error. 

If I issue a second connect(), after the select() indicates there is 1 
descriptor ready for write, this correctly returns -1 and 'Connection refused'. 

But is this the proper way to handle this condition?

-Carl

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to