help-gnutls
[Top][All Lists]
Advanced

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

Re: [Help-gnutls] handshake with non-blocking sockets?


From: Nikos Mavrogiannopoulos
Subject: Re: [Help-gnutls] handshake with non-blocking sockets?
Date: Tue, 22 Mar 2005 16:02:36 +0100
User-agent: KMail/1.7.2

On Monday 21 March 2005 23:10, Daniel Stenberg wrote:
> Hi
Hello,

> Thanks Simon for the previous answers. I'm now progressing fine!
> Here's another question:
> When I use non-blocking sockets and call gnutls_handshake(). What happens
> and how should I behave? The manual doesn't mention non-blocking
> anywhere...
> When it returns GNUTLS_E_AGAIN, can I simply do a select() on the socket to
> wait for data to become readable or writable and then call it again?
Yes. In order to see whether you have to check for readability or writability
use the gnutls_record_get_direction() function.

> Or  could it return with one of those return codes while still having data 
to
> be processed without having to wait for anything on the socket? 
No. Non-blocking is on the sockets part, not in gnutls. Gnutls will always
process as much as possible permitted by the data available.


-- 
Nikos Mavrogiannopoulos




reply via email to

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