assuan external loop over socket

Ben Kibbey bjk at luxsci.net
Sun Dec 2 18:47:45 CET 2007


On Fri, Oct 26, 2007 at 03:33:09PM +0200, Marcus Brinkmann wrote:
> 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.

[...]

I have a need for this now. I have a client that sends an inquire
command to the server, but the data needs to be sent ASSUAN_LINELENGTH
bytes at a time (memory restrictions). assuan_transact() can't do this
with it's inquire callback and keep parsing status messages from the
server at the same time, which I also need. I can't call
assuan_read_line() to do the status line parsing in the inquire callback
because assuan_read_line() blocks?

I'm guessing how the asynchronous client works: If I were to call
assuan_transact() which would setup the callbacks, then call
assuan_process_next() until the inquire callback returns EOF, or an
error, to finish the command. Then call assuan_process_done() to get the
command result from the server. Is this right?

-- 
Benjamin J. Kibbey bjk at luxsci.net/jabber/freenode
3019 F5FC AA33 5BC7 BE9F 09D2 393E DBD2 40D5 FA7E



More information about the Gnupg-devel mailing list