If you try and issue a connect() call on a socket where the device the other
end is dead and thus the connection cannot be made, it takes something like
20 seconds to figure this out. When running in a system where you're doing
fiscal stuff, having to wait 20 seconds while the system sits on its
backside figuring out it's got no connection on a device is just silly -
you're losing big bucks while that's happening.

Is there any way we can control the timeout on connect()? I requested
Winsock 2.0 and got it, and thus tried using setsockopt() with SO_SNDTIMEO
and SO_RCVTIMEO:

iTimeout = 1000 ;       // Assume millis? Tried 5 anyway, just in case.
setsockopt(m_Sock, SOL_SOCKET, SO_SNDTIMEO,(const char *)&iTimeout,
sizeof(int) );
setsockopt(m_Sock, SOL_SOCKET, SO_RCVTIMEO,(const char *)&iTimeout,
sizeof(int) );


but it has no effect.

Any ideas? Any WSA...() calls I can make to help?

--
Jason Teagle
[EMAIL PROTECTED]



_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for 
subscription changes, and list archive.

Reply via email to