[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] combining evhttp_start and evhttp_make_request
- To: libevent-users@xxxxxxxxxxxxx
- Subject: [Libevent-users] combining evhttp_start and evhttp_make_request
- From: Ron Combs <roncombs64@xxxxxxxxx>
- Date: Mon, 25 Jan 2010 10:08:59 -0500
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Mon, 25 Jan 2010 10:09:12 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=53q3vxdGIw3ZVgxvbufT7WsPdl4chMxh5I+od+nStf0=; b=Ifv2W4GH55GZp/xBi7YMDsl13k9XLanCXAq7LQ+ZTEMcorjYSDpPYwy0PVgwEdFgM6 jGIqq70qViuGvLdfw5pRAMAc+O9+HnbjthBTcxcpHlP8XALMsICWb3KcXtB3K7FjGUyL y4eCymTl2jIgmQ68EZ8ckxRAiyUUJznV+Y3FU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=eeB3yD9D/0rvGeYerNxqQkDm36+wrjk+lLOUhVLC2abHC+nf1EvLxqTLRoHf/t4fhv 1q6BZhElFAseJEbpoDcgAmUfmxWjG3M00MO0bFlOTuNdMP+FLkPVdfv0QfzXYJWkUAAy H5Tu4YaFSmWKUHmwP1OYh0DpDztMEmQHKWe8o=
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
I am writing an app that uses evhttp_start to call a handler
then when a handler is called upon a http request,
i have evhttp_make_request called to fetch and return data from a remote host.
Without using evhttp_make_request, evhttp_start can handle thousands of connections.
When I have evhttp_make_request to fetch data from a remote host upon each http client request,
it appears to have some problems such as its slower, and starts blocking.
I looked around for example code but haven't found anything good.
What is the right way to make this functionality work properly? Should I skip using evhttp_make_request
and simply use the raw event , bufferevent and callback functions?