[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnutls_record_check_pending() issue in GNUTLS 3.0.3 ??
From: |
Nikos Mavrogiannopoulos |
Subject: |
Re: gnutls_record_check_pending() issue in GNUTLS 3.0.3 ?? |
Date: |
Wed, 09 Nov 2011 15:40:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20111010 Icedove/3.1.15 |
On 11/09/2011 03:30 PM, address@hidden 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