[Libevent-users] questions about bufferevent callbacks in multithreaded code

2013-05-01 Thread Sashan Govender
Hi I need to clarify my understanding of how bufferevent objects work with mulithreaded code. If a bufferevent triggers a callback (read or write) does it hold a lock until that callback completes? Do the locks use a recursive mutex? Thanks

[Libevent-users] evbuffer_find versus evbuffer_search

2013-04-10 Thread Sashan Govender
Hi I'm porting some code from libevent 1.4 to 2.0 and in the 1.4 version some of the code is using evbuffer_find find a pointer to the start of a sequence then calculating a pointer difference from it: u_char* end = evbuffer_find(input, pattern, 2); ... ptrdiff_t len = end - input->buffe

Re: Re : [Libevent-users] libevent client tries to reconnect to a lost server

2013-01-14 Thread Sashan Govender
On Tue, Jan 15, 2013 at 9:52 AM, wrote: > It serms that this is not the way it should be done. The whole buffer > event should be removed and created again, until the server starts to > respond. Unfortunately this method causes a segmentation fault. I had no > idea of how such a simple problem ca

Re: [Libevent-users] Q: Exception callbacks and events that should run immediately

2012-12-05 Thread Sashan Govender
Hi! > 1) I don't see any notion of event notification on FD exception - e.g. > socket close. > There are some words for buffer events, but nothing for regular file > descriptor based callbacks. So what is a good way to get a callback > when specific > FD is closed/disconnected? > If