help-gnutls
[Top][All Lists]
Advanced

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

Re: [Help-gnutls] passing SSL connection to another process


From: Timo Sirainen
Subject: Re: [Help-gnutls] passing SSL connection to another process
Date: Thu Aug 15 06:45:01 2002
User-agent: Mutt/1.4i

On Thu, Aug 15, 2002 at 12:36:15PM +0300, Nikos Mavroyanopoulos wrote:
> 
> > Another thing that isn't quite clear from the documentation is how to use
> > gnutls with nonblocking I/O. All functions returning GNUTLS_E_AGAIN should
> > be called again, but I'd also need to know if it happened on read or write,
> > so I could call it again at proper time. I think this is a problem only with
> > gnutls_handshake()?
> 
> I don't understand the question.

Basically: How do I create a poll() based process handling multiple SSL
connections?

If I've understood everything right, there's 3 functions that may block if
socket is in blocking mode: gnutls_record_recv(), gnutls_record_send() and
gnutls_handshake().

With nonblocking sockets, if gnutls_record_recv() doesn't read a full
packet, GNUTLS_E_AGAIN is returned. So I know it wants more data, and I call
it again once poll() says there's more data. The same goes for
gnutls_record_send().

But what about gnutls_handshake(), AFAIK it both receives data and sends
data. How should I know when to call it again? I'd want something similiar
to gnutls_record_check_pending() to tell me if handshake waits on input or
output.





reply via email to

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