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 _______________________________________________ Help-gnutls mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gnutls
