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

2010-11-23 Thread Sid
Ok I am feeling that *struct* evbuffer_cb_entry *evbuffer_add_cb(*struct* evbuffer *buffer, evbuffer_cb_func cb, *void* *cbarg); might be the solution to my problems...? Adding a calbaack to see how much data is drained from the buffer?? On Tue, Nov 23, 2010 at 9:00 PM, Sid wrote: > Sorry

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

2010-11-23 Thread Kevin Bowling
On Tue, Nov 23, 2010 at 10:53 PM, Ken Feng wrote: > Within libevent, of course. As a point of reference, let's say we > start up the TCP Echo server that is in Nick's book here: > http://www.wangafu.net/~nickm/libevent-book/Ref8_listener.html

Re: [Libevent-users] IRIX build failure in regress_util.c

2010-11-23 Thread Kevin Bowling
On Tue, Nov 23, 2010 at 8:16 PM, Kevin Bowling wrote: > On Mon, Nov 22, 2010 at 8:43 PM, Nick Mathewson wrote: > >> On Mon, Nov 22, 2010 at 6:59 PM, Kevin Bowling >> wrote: >> > On Mon, Nov 22, 2010 at 9:54 AM, Nick Mathewson >> wrote: >> >> >> >> On Mon, Nov 22, 2010 at 4:06 AM, Kevin Bowling <

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

2010-11-23 Thread 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 socket. I use buffered > events. As you can

Re: [Libevent-users] IRIX build failure in regress_util.c

2010-11-23 Thread Sid
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 socket. I use buffered events. As you can see in the post, the post above is a simple server that loops over a set of docs and cre

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

2010-11-23 Thread Ken Feng
Within libevent, of course. As a point of reference, let's say we start up the TCP Echo server that is in Nick's book here: http://www.wangafu.net/~nickm/libevent-book/Ref8_listener.html I could handle a normal client shutdown by sending a special shutdown sequence from client to server, but what

Re: [Libevent-users] IRIX build failure in regress_util.c

2010-11-23 Thread Kevin Bowling
On Mon, Nov 22, 2010 at 8:43 PM, Nick Mathewson wrote: > On Mon, Nov 22, 2010 at 6:59 PM, Kevin Bowling > wrote: > > On Mon, Nov 22, 2010 at 9:54 AM, Nick Mathewson > wrote: > >> > >> On Mon, Nov 22, 2010 at 4:06 AM, Kevin Bowling < > kevin.bowl...@kev009.com> > >> wrote: > >> > IRIX 6.5.29, la

RE: [Libevent-users] Another possible iocp issue.

2010-11-23 Thread Kelly Brock
Actually I thought of something and ran a quick test. Seems this was definitely my problem. Basically in the process of thinking "single threaded" I forgot that the IOCP backend would still be running in separate threads, so I was not locking the buffers when adding/removing data. This does seem

RE: [Libevent-users] Another possible iocp issue.

2010-11-23 Thread Kelly Brock
Grr, CNR.. With the little testbed I was unable to reproduce the problem. It is likely a timing issue or I do have a problem somewhere in my code which is of course very possible. I will keep poking at this later tonight and see if I can get a repro case. KB > > >        I'll post more