Francois PIETTE wrote: >> I just wonder how other programs can provide a >> user defined TCP timeout that appears to overrule the system setting or >> is something like that just a fake? > > I've searched on MSDN and found that setsockopt has those options: > SO_RCVTIMEO Receives time-out in milliseconds (available in the Microsoft > implementation of Windows Sockets 2). > SO_SNDTIMEO Sends time-out in milliseconds (available in the Microsoft > implementation of Windows Sockets 2). > > Maybe this is what you search for ? > The text is not clear is those BSD options are supported or not !
Now I understood the what BSD means :) Berkley Software Distribution or so, the roots of Winsock. I think it's not supported, since I added the block below to TCustomWSocket.Connect and receive data just fine though the timeout is set to 1 ms. Or am I missing something? { Socket type is SOCK_STREAM } optval := 1; iStatus := WSocket_Synchronized_setsockopt(FHSocket, SOL_SOCKET, SO_RCVTIMEO, @optval, SizeOf(optval)); if iStatus <> 0 then begin SocketError('setsockopt(SO_RCVTIMEO)'); Exit; end; Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be