Calls getsockopt(SOL_SOCKET, SO_ERROR) to obtain the current error code for the socket referred to by fd.
the current error code for this socket, which can be 0, or 0 if an error code could not be obtained for fd.
See Implementation
Calls getsockopt(SOL_SOCKET, SO_ERROR) to obtain the current error code for the socket referred to by fd.