[gnutls-dev] Re: GnuTLS for Windows

Werner Koch wk at gnupg.org
Tue Jul 18 11:26:12 CEST 2006


On Sun, 16 Jul 2006 15:18, Simon Josefsson said:

> Alas, Windows' select() only works on sockets, not file descriptors.
> gnutls-cli uses select to find out whether there is data on stdin and
> from the server, and it is the stdin part that doesn't work.  I think
> there are some solutions to this, but it's not clear to me how to
> implement them yet.

Checkout gpgme: gpgme/w32-io.c shows how to do it. There is also a
posix-io.c of course.  The latest glib has similar code now as well as
special cases for sockets.  It is all a mess: WaitForMultipleObjects
is not able to wait on all types of file descriptors. In particular if
you are working with CreatePipe, you need to have a thread for each fd
you want to wait on.

Salam-Shalom,

   Werner





More information about the Gnutls-devel mailing list