Re: [Libevent-users] What is the best way to detect a client socket disconnect?

2010-11-24 Thread Ken Feng
Hi Nick, That was >exactly< it - if I remove my bufferevent_free( bev ) from echo_event_cb() and call it when I intend to cut-off, the echo_event_cb() gets invoked. TYVM. - Ken On 11/25/10, Nick Mathewson wrote: > > FWICT, your code isn't really simulating a cutoff: the file descriptor > alloc

[Libevent-users] Re: Linux, epoll, libevent, regressions, stability, and 2.0.9

2010-11-24 Thread Nick Mathewson
On Sat, Nov 20, 2010 at 3:25 AM, Nick Mathewson wrote: [...] >  * Include both backends; make the non-changelist backend on by > default.  The problems here are that a) the non-changelist backend is > slower, and most people won't do whatever is necessary to activate the > faster one, and b) the n

Re: [Libevent-users] What is the best way to detect a client socket disconnect?

2010-11-24 Thread Nick Mathewson
On Wed, Nov 24, 2010 at 10:43 AM, Ken Feng wrote: > Hi Kevin, > > I appreciate the quick reply.  After reading Nick's book, that's what > I suspected, but I can't seem to get it to work.  I essentially took > Nick's TCP Client code, expanded it a bit to include an echo client, > and started a serv

[Libevent-users] libevent doxygen

2010-11-24 Thread Kevin Bowling
I've uploaded doxygen of the current git master here, http://mc.kev009.com/libevent/. It syncs up a bit better with Nick's book. I'll try and keep it reasonably up to date with master. Regards, Kevin

Re: [Libevent-users] Closing bufferevents sockets from the server side

2010-11-24 Thread Simon Perreault
On 2010-11-24 15:54, Sid wrote: > Well water marks seem to be the way to go.. But before your reply came I > saw that in the library there is an interface > > *struct* evbuffer_cb_info { > size_t orig_size; > size_t n_added; > size_t n_deleted; > }; > > *typedef* *void* (

Re: [Libevent-users] Closing bufferevents sockets from the server side

2010-11-24 Thread Sid
Well water marks seem to be the way to go.. But before your reply came I saw that in the library there is an interface *struct* evbuffer_cb_info { size_t orig_size; size_t n_added; size_t n_deleted; }; *typedef* *void* (*evbuffer_cb_func)(*struct* evbuffer *buffer, *con

Re: [Libevent-users] What is the best way to detect a client socket disconnect?

2010-11-24 Thread Ken Feng
Hi Kevin, I appreciate the quick reply. After reading Nick's book, that's what I suspected, but I can't seem to get it to work. I essentially took Nick's TCP Client code, expanded it a bit to include an echo client, and started a server thread and a client thread. The client sends a hello world

RE: [Libevent-users] Closing bufferevents sockets from the server side

2010-11-24 Thread Kelly Brock
Hi Sid, > Sorry that got posted by mistake in the wrong thread... here it is > again... > > > Hi, > I am using libevent 2.03 alpha 1 to create an app > . The app structure is as follows: > > A C++ app wraps lib event to listen on a domain socke