Re: [Libevent-users] Method to get the fd associated with a http evcon object

2012-08-31 Thread Nick Mathewson
On Fri, Aug 31, 2012 at 3:54 PM, Alap Kumar Sinha wrote: > Hi, > > Is there a way to get the file descriptor associated with the evcon object > of a request (evhttp_request)? > evhttp_connection_get_bufferevent + bufferevent_getfd is intended to work. yrs, -- Nick **

[Libevent-users] Method to get the fd associated with a http evcon object

2012-08-31 Thread Alap Kumar Sinha
Hi, Is there a way to get the file descriptor associated with the evcon object of a request (evhttp_request)? /**/ struct evhttp_connection {     /* we use this tailq only if this connection was created for an http * server */     TAILQ_ENTRY(evhttp_connection) next;  

Re: [Libevent-users] EV_WRITE - Wait for a socket or FD to become writeable.

2012-08-31 Thread Oleg
EV_WRITE calls whenever you can write to send buffer until it's not full. So if you have never called send(), but EV_WRITE is enabled you will receive this event each new loop (your CPU will be ~100% used). If you have called send() and it didn't return EAGAIN you will also receive this event ne