curl-library
Re: Setting priority for an easy handle in a multihandle
Date: Mon, 30 Apr 2012 11:27:52 +0400
On 04/29/2012 09:19 PM, gokhansengun_at_gmail.com wrote:
>
> 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.
I am also thinking on something similar. But I am a little skeptic about
the effectiveness. Since I am watching the sockets, I can choose the
socket to be processed(multi_socket_action) next, based on my priority.
However, this will only make sense, if there can be multiple sockets
ready to be processed at the same time. As Daniel mentioned in another
mail, since these sockets are just tcp streams, two sockets becoming
ready at the same time might be unrealistic. If that is the case any
extra effort spent on managing the sockets would be useless. Could any
experts comment on this?
> If there is a built-in support in curl, I would love to learn about it too.
The fact that curl does not support some thing like this, might be a
good indication that my requirement itself is unrealistic :-)
-lijo
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-04-30