[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] http client throttle



You can either set a timer to ease up the requests/s, or use the rate-limiting functionality.Â
Use "struct buffer event * evhttp_connection_get_bufferevent", and read the section on
on this api here:Â
http://www.wangafu.net/~nickm/libevent-book/Ref6a_advanced_bufferevents.html

On Sun, Jul 19, 2015 at 3:30 AM Jesper Lundgren <koudelkaa@xxxxxxxxx> wrote:
Hello, I am using libevent http in client mode to send GET requests. Many of the requests I try to send end with http_req_done callbacks where req == NULL and socket error is set to 36 (Operation now in progress). My guess is that the server can not handle the traffic but I am not sure what is the best approach to dynamically adjust the request rate in libevent to prevent socket errors.

Any suggestions?

/JL