Home > other >  Connect socket communication failure, getsockopt mistake? 0
Connect socket communication failure, getsockopt mistake? 0

Time:10-09

a TCP connection, the socket connect failure, mistakes are No route to host,
Then using getsockopt (sockfd, SO_SOCKET, SO_ERROR, & amp; Err, & amp; Why errsize) remove the error code is 0?

CodePudding user response:

Beg you great god answers, grant instruction

CodePudding user response:

Could you please post your code, and then further analysis reasons.

CodePudding user response:

refer to the second floor cfjtaishan response:
could you please post your code, and then further analysis reasons.


Code not infomation, sorry
Connect is a socket (), then the connection fails, then read errno error code is 113, that is No route to host,
Then using getsockopt (socketfd, SO_SOCKET, SO_ERROR, & amp; Err, & amp; Errsize) read err is 0, don't know why

CodePudding user response:

No one know?

CodePudding user response:

Hope the great god answers to grant instruction, scores can be increased

CodePudding user response:

Errsize the value of the

CodePudding user response:

Can use when connect the destination address of ping? If you can't ping, of course, the connect failed,
  • Related