[gnutls-help] decoding memory buffers in a tls session

Nikos Mavrogiannopoulos nmav at gnutls.org
Sat May 31 10:45:40 CEST 2014


On Fri, 2014-05-30 at 17:37 -0400, Vittorio Giovara wrote:

> Hello again,
> This method works fine for normal data transmission, but since I've 
> tried to remove the do {} while loop when doing handshake (and rely on 
> the application loop to retry the connection) I can't seem to find a way 
> to complete the handshake.
> In fact when data from the callback is available and I hook it up the my 
> record_recv callbacks they will fail instead of asking for more data 
> (invalidating the session in the meantime).

When you have no data you could return -1 and set errno to EAGAIN, i.e.,
emulate recv().

regards,
Nikos





More information about the Gnutls-help mailing list