简体   繁体   中英

Non blocking socket connect() get errno ETIMEDOUT-Connection timed out

I have a non-blocking IPv4 TCP socket, when I try to connect(), I get the errno ETIMEDOUT. It confused me a lot, since I have not set timeout on socket. What is some possible reasons of this case?

From man page:

ETIMEDOUT:

Timeout while attempting connection. The server may be too busy to accept new connections. Note that for IP sockets the timeout may be very long when syncookies are enabled on the server.

You can also see ETIMEDOUT in this quesiton How to handle ETIMEDOUT error

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM