Hi,

I've been looking for a way to have something like 
CURLMOPT_MAX_HOST_CONNECTIONS - but instead of limiting by hostname:port, limit 
by peer / IP address.

It seems it's not straightforward to add this in a way similar to 
CURLMOPT_MAX_HOST_CONNECTIONS since that limit seem to be checked before the 
address resolution has been done.

Another idea I had was trying to use CURLOPT_OPENSOCKETFUNCTION and introduce 
some kind of special return value (like CURL_SOCKET_BAD) which causes the 
connection to be put in pending state, and have libcurl retry the socket 
creation later. That could also be useful for implementing other custom ways of 
limiting connections, or to retry socket creation if the system (or 
application) runs out of sockets.

Any thoughts on this? Maybe I'm missing some way in which this can already be 
implemented right now without changes to libcurl?

Thanks,

Patrick
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to