cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Setting priority for an easy handle in a multihandle

From: <gokhansengun_at_gmail.com>
Date: Sun, 29 Apr 2012 20:19:56 +0300

> I would like to know whether there is a way to set a higher priority for an easy handle, so that my rpc methods will not be affected by uploads and downloads? I am thinking of using another multi handle, dedicatedly for rpc. Would it help? I am also interested to know, whether some one is already handling this, and how?
>

I would like to tell about my home made solution to a similar requirement. I keep one multi interface for each easy interface. Then I keep references to these in my handle allowing to keep me the type of connection and additional information there too.

The trick is to query max timeout values from active multi interfaces and calculate the minimum of them, then select with this timeout. After return from select, you have to run your own priority scheduler to decide the most prior multi interface to process, then process it if it has something to process.

Sorry I do not have access to my development machine and provide ultimate details right now.

If there is a built-in support in curl, I would love to learn about it too.

> Thanks in advance.
> -lijo
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-04-29