help-gnutls
[Top][All Lists]
Advanced

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

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


From: Simon Josefsson
Subject: [Help-gnutls] Re: handshake with non-blocking sockets?
Date: Mon, 21 Mar 2005 23:45:06 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

Daniel Stenberg <address@hidden> writes:

> 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? 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?
>
> Or did I just miss this (too) in the manual?

This is written in haste, and probably doesn't answer your
question...  Anyway, is the thread in

http://article.gmane.org/gmane.comp.encryption.gpg.gnutls.devel/1267

of any help?

If I understand correctly, though, GnuTLS perform some internal
buffering, so calling select might not be reliable.  But I don't have
much experience with non-blocking I/O and GnuTLS.  Perhaps Nikos can
chime in.  I'm not sure how portable it is for GnuTLS to push data
back into the OS buffers, which would be one way to make select() work
as expected.

Regards,
Simon




reply via email to

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