The async socket handler in the client is issuing a connect(2) on a non-blocking socket via XrdNetConnect::Connect (which returns EINPROGGRESS) and subscribes to write notifications for the socket in order to get notified when connect returns. This is done in accordance with the manual, which says:

The socket is nonblocking and the connection cannot be completed immediately. It is possible to
select(2) or poll(2) for completion by selecting the socket for writing. After select(2) indicates writability,
use getsockopt(2) to read the SO_ERROR option at level SOL_SOCKET to determine whether
connect() completed successfully (SO_ERROR is zero) or unsuccessfully (SO_ERROR is one of the
usual error codes listed here, explaining the reason for the failure).

The write notification arrives erratically when using the built-in poller on MacOSX, we haven't observed this issue using the built-in poller on Linux, nor the libevent poller on any platform.


Reply to this email directly or view it on GitHub.



Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1