On 11/09/2011 03:30 PM, [email protected] wrote:
> I'm integrating secure email support into an existing mailer app that 
> functions essentially as a mail client.
> So, in sending emails, the processing of SMTP command responses may be 
> delayed while waiting for a particular server.
> The legacy code handles this delay using the socket select() call to check 
> for input and timeout if nothing is coming back from a server.

You should continue using select() then. gnutls_check_pending() checks
for data in the gnutls_session_t buffers, not in the network buffers.
You should use it to complement select() (i.e., call select() if
gnutls_record_check_pending() returned zero).

This is what gnutls-cli does.

> hence, my reasoning for the need to sleep. 

You don't need it. Use select() instead.

> gnutls_record_recv() blocks if it has no data, yes??

If your socket is set to block it will block.

regards,
Nikos

_______________________________________________
Help-gnutls mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-gnutls

Reply via email to