assuan external loop over socket

Marcus Brinkmann marcus.brinkmann at ruhr-uni-bochum.de
Fri Oct 26 15:33:09 CEST 2007


At Thu, 25 Oct 2007 09:59:20 -0400,
Ben Kibbey <bjk at luxsci.net> wrote:
> 
> The assuan info docs say connecting to a socket with the external IO
> loop isn't supported. Are there any plans to do this in the near future?

If you need to do asynchronous assuan communication in the client,
then yes, there is a small function missing, which I can add easily.
However, from your description below you seem to have trouble in the
server, which should be fully supported already.  Can you clarify?

> I really do need this feature. Or maybe I'm misunderstanding howto send
> IO FD's to the server? I have a process that wants to listen on a socket
> without blocking. I've done the bind/listen/pth_accept() and have FD
> which is setup with assuan_init_socket_server_ext(). Then I select() on
> all file descriptors that are returned with asssuan_get_active_fds().

You should select only on the inbound fd.  For socket servers, this
should be the same as the one returned by accept(), so there is no
actual need to call assuan_get_active_fds().

> When I connect to the socket with socat, I get an IPC read error from
> assuan_process_next(). Maybe I'm doing something wrong?

I never tried with socat.  You might want to try with
gpg-connect-agent from the gnupg tools directory.  The reference
implementations are in dirmngr and gpa.  Can one look at your code
somewhere?

Thanks,
Marcus




More information about the Gnupg-devel mailing list