help-gnutls
[Top][All Lists]
Advanced

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

[Help-gnutls] Re: Equivalent to fdopen?


From: Simon Josefsson
Subject: [Help-gnutls] Re: Equivalent to fdopen?
Date: Tue, 19 Aug 2008 01:11:23 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

Florian Weimer <address@hidden> writes:

> * Simon Josefsson:
>
>> There is no such equivalent now.  If it is possible to implement it, it
>> would be a cool feature.  But is it possible to implement it?  I dunno.
>> Seems like you need some hooks into the f* buffering structures used by
>> libc.  It doesn't sound trivial to do.
>
> You could use socketpair() and threads.  But it's certainly not a nice
> approach.

Right, and since it would be good to avoid thread stuff in libgnutls, I
think it cannot be made part of libgnutls.  But if someone wants to
provide code for this, putting it in a libgnutls-stream library or
similar could be done, and may be useful.

I suspect rewriting code to use normal read+write instead of buffered f*
function is simpler and more reliable though.  TLS has some semantic
differences compared to network streams that may be difficult to
simulate (e.g., re-handshakes and alert messages).

/Simon




reply via email to

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