10-16-2019, 05:27 PM
(10-16-2019, 04:51 AM)BartKindt Wrote: Now I have to ask you how I should use this SetSockOpt to set a Timeout for the SSL negotiation
There is no "SSL negotiation" timeout. And even if there were, it wouldn't be set as a timeout at the socket layer, it would be set as a timeout at the OpenSSL layer. The SetSockOpt() method sets options on the underlying socket itself, such as SO_SNDTIMEO and SO_RCVTIMEO (did you read the documentation I linked to in my last reply?), eg:
Code:
// timeout blocking reads after 15 secs
IdTCPClient.Socket.Binding.SetSockOpt(Id_SOL_SOCKET, Id_SO_RCVTIMEO, 15000);
// timeout blocking sends after 15 secs
IdTCPClient.Socket.Binding.SetSockOpt(Id_SOL_SOCKET, Id_SO_SNDTIMEO, 15000);
