For a non-blocking net socket, can connect() return 0?
The man page just says it will return -1 and set errno to EINPROGRESS if "The socket is non-blocking and the connection cannot be completed immediately".
What does "immediately" exactly mean?
If connect() CAN return 0 in this case, then under what situation it will return 0 which stands for success? When network between client and server is very good? Or?