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

[Libevent-users] delay evhttp requests



Hi,

i want to delay evhttp requests as if i answer them i'll immediatly get
the next request. Speedwise this would be good - but not with thousands
of clients hammering at me at the same time.

So in case my backend is busy i'd like to send kind of keepalives
but delay them for e.g. 10-30 seconds.

currently i am getting the request callback and now my idea was to
put the evhttp_request on hold and put a timer up which then pushes
the answer.

From reading the API i simply do an

	evhttp_request_own

on the request structure and return from callback. Later in the
timer callback i do a

	evhttp_send_reply
	evhttp_request_free

Is my understanding of the documentation right?

Flo
-- 
Florian Lohoff                                                 f@xxxxx

Attachment: signature.asc
Description: Digital signature