Discussion Locked

Long TCP/IP timeout

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
We use VC 6.0 for TCP/IP development (Client/server applications). Host1 establishes a TCP/IP connection with host2. If one application on host1 sends a packet to another application on host2 while host2 is disconnected, it takes around 3 minutes for TCP/IP to return an error. Is there a way to decrease this timeout?

1 reply

by lsat_lan

May u can try the setsockopt option.

iVal = 20000;
ret = setsockopt(sClient, SOL_SOCKET,SO_RCVTIMEO, (char *)&iVal, sz);

Hope this help!

This discussion is closed to new replies.