curl-library
Re: Question regarding multiple IMAP operations
Date: Wed, 27 May 2015 21:24:44 +0200 (CEST)
On Wed, 27 May 2015, Adam wrote:
> Ray, I've actually written C89 code to parse IMAP responses. libcurl IMAP is
> indeed garbage, because the only thing it does for you that a straight
> socket doesn't is encryption
... and an non-blocking IMAP command/response state machine with a stable API
that allows you to do IMAP communication with any number of IMAP servers in
parallel...
> So as soon as I remove these crashes I will post my code to hopefully make
> it a bit more of a complete IMAP library.
That'd be awesome!
> Let's say I want first list folders, the default, then 1 second later I
> want to "EXAMINE OUTBOX", then 1 second later I want to read first message
> ""imap://imap.example.com/INBOX/;UID=1" There are no code samples showing
> how to do multiple requests like this.
Re-use the handle, use the easy interface and just issue one request at a
time. If you're fine with them being done in serial.
> Would something like this be the correct way? Or is this what the multi_
> function families are for?
multi is for non-blocking operations or several simultaneous ones.
[code cut off]
Looks perfectly reasonable from a quick glance!
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2015-05-27