help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnutls] gnutls_handshake and timeout


From: Nikos Mavrogiannopoulos
Subject: Re: [Help-gnutls] gnutls_handshake and timeout
Date: Wed, 4 May 2005 23:20:01 +0200
User-agent: KMail/1.7.2

On Tuesday 03 May 2005 17:32, Regit wrote:
> Hi,
>
> I'm looking for the correct way to set a timeout to gnutls_handshake. I
> want to be able to say something like stop handshake after N seconds, so
> I will be able to free threads working on handshake.
> I don't want that a simple telnet on application port blocks the thread
> for an eternity.
Hello,
 The only reason gnutls_handshake() blocks are the recv() and probably send() 
calls. You can set a timeout on these calls with setsockopt(). In that case
gnutls_handshake() will return GNUTLS_E_AGAIN. Hope that helps.

> BR,

-- 
Nikos Mavrogiannopoulos




reply via email to

[Prev in Thread] Current Thread [Next in Thread]