[Help-gnutls] push/pull functions
Robin Redeker
elmex at x-paste.de
Wed Sep 26 12:58:35 CEST 2007
On Wed, Sep 26, 2007 at 01:11:26PM +0300, Nikos Mavrogiannopoulos wrote:
> On Wednesday 26 September 2007, Robin Redeker wrote:
>
> > > > I have a (maybe not so?) simple question:
> > > > Can I call gnutls_record_recv/gnutls_record_send safely while I'm in a
> > > > push/pull callback?
> > > As long as you don't use the same session, it should be safe.
> > > > The reason I'm asking is that I want to make bindings for GNU
> > > > Smalltalk, which has support for non-preemtive multiple threads of
> > > > execution.
> > > gnutls can be used with multiple threads, as long as the gcrypt callbacks
> > > are set and the same session is not accessed by multiple threads.
> > Well, usually you have a writer and a reader thread per session. Will
> > those interfere? Or does it mean that I'll have to use non-blocking I/O
> > semantics to ensure that there are not two threads doing a recv and send
> > at the same time?
>
> It should work. As far as I remember it is even possible to have recv and send
> from different processes (using fork).
That sounds great. When I tried it today morning it seemed to work fine,
good to know it's supposed to work that way.
Thanks!
Robin
More information about the Gnutls-help
mailing list