curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: POP3 multiple TOP per transaction possible??

From: acorn12 <acorn12_at_telus.net>
Date: Sun, 18 Feb 2018 14:57:43 -0800

On 2018-02-18 9:33 AM, Daniel Stenberg wrote:
> On Sat, 17 Feb 2018, acorn12 wrote:
>
>> As I need to check the status of a POP3 mailbox and retrieve all
>> header information about all messages, I am currently using one call
>> to libcurl per message. For a dozen or more messages, this can be
>> relatively slow as it requires a transaction per call.
>
> Define "transaction" ? libcurl doesn't need to close the connection
> nor redo the login between invokes.
Assuming I want to get all of the headers for the messages in a mailbox,
I would need to execute one TOP command per message and each
'transaction' in this case would include a login, get data, logout for
each header.
>
>> Is it possible to accomplish this with libcurl and if so, how can I
>> implement such a scheme?
>
> By reusing the easy handle, subsequent calls to curl_easy_perform()
> should be pretty quick.
That is what I was hoping for. :-)
It implies, that the calls prior to curl_easy_perform() initiate a
transaction which will be closed by curl_easy_cleanup( );

In that case, I can then retrieve all the headers in one transaction
with a loop. Very cool and useful.
Thank you.

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-02-19