Re: [Libevent-users] How to close bufferevent connection?

2010-06-03 Thread Nick Mathewson
On Mon, May 31, 2010 at 11:07 PM, Felix Nawothnig wrote: > Hey. > > What's the "suggested" way to close a bufferevent connection? > > Currently I do: > >        fd = bufferevent_getfd(bev); >        evutil_closesocket(fd); > > ... followed by a manual: > >        my_event_handler(bev, BEV_EVENT_EO

Re: [Libevent-users] socket message boundary problem

2010-06-03 Thread Nick Mathewson
On Mon, May 31, 2010 at 1:14 PM, Hor Meng Yoong wrote: > Hi: > >   I am using libevent2. Is that a wrapper function/library to send and > receive fixed length message, or variable length message with message length > embedded in the first 2 bytes with libevent2? Thank Got all three of your messag

Re: [Libevent-users] libevent with EV_WRITE question

2010-06-03 Thread Sherif Fanous
Thank you for an excellent explanation Cheers On Thu, Jun 3, 2010 at 4:26 PM, Nick Mathewson wrote: > On Sat, May 29, 2010 at 6:44 AM, Sherif Fanous > wrote: > > Hi > > I have the following scenario, and want to verify the expected outcome > > pthread_wrlock_rdlock(&(server->lock)); > > if (se

Re: [Libevent-users] libevent with EV_WRITE question

2010-06-03 Thread Nick Mathewson
On Sat, May 29, 2010 at 6:44 AM, Sherif Fanous wrote: > Hi > I have the following scenario, and want to verify the expected outcome > pthread_wrlock_rdlock(&(server->lock)); > if (server->is_connected) { >     struct send_packets_args *send_packets_args; >     send_packets_args = malloc(sizeof (st