Re: [Libevent-users] Guides for switching from select to libevent.

2009-09-20 Thread q6Yr7e0o nIJDVMjC
Does anyone know of any well-written guides for switching an application from select based socket handling to libevent? Not really a guide how to switch but a well written libevent guideline http://www.wangafu.net/~nickm/libevent-book/ ___

Re: [Libevent-users] evhttp chunked response bug?

2009-09-04 Thread q6Yr7e0o nIJDVMjC
Shouldn't you call evhttp_send_reply_end in the callback of evhttp_send_reply_chunk which is only called if the sending succeeded? On 9/4/09, Haiping Zhao hz...@facebook.com wrote: Hi, there, I'm reading evhttp's source code, and I'm not sure if I've found a bug, or I just mis-read it. But

Re: [Libevent-users] evhttp chunked response bug?

2009-09-04 Thread q6Yr7e0o nIJDVMjC
Hi, Hmm, that should help. I have several send_reply_chunk() though. Are you suggesting they should form nested callback chains? Afaik it's the only threadsafe way of ensuring to not call reads and writes on already closed descriptors. Although i know it's highly unportable i use gcc's nested

Re: [Libevent-users] strange segfault in 2.0.2

2009-08-17 Thread q6Yr7e0o nIJDVMjC
Can you provide a minimal version of your programm which crashes on your laptop with these segfaults? ___ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users

Re: [Libevent-users] libevent cmake scripts

2009-07-24 Thread q6Yr7e0o nIJDVMjC
Would it be possible to create cmake scripts for 2.x, too since they will much likely be included into the release ___ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users

[Libevent-users] How to schedule a plain event

2009-07-13 Thread q6Yr7e0o nIJDVMjC
Hi, how is it possible to schedule a callback in the next eventloop iteration? Of course i could add a timer event with timeout 0 but this seems like a lot of overhead. I just want a function to be called in the next event iteration (i can't call it directly in another libevent callback because

Re: [Libevent-users] How to schedule a plain event

2009-07-13 Thread q6Yr7e0o nIJDVMjC
Hi The easiest thing to do here is to use the event_active() call to make the event active now.  But it doesn't do quite what you asked for: the callback will be run later in the current iteration of the loop, not in the next iteration.  If it  needs to be in the next iteration, I can't

[Libevent-users] IOCP backend questions

2009-06-24 Thread q6Yr7e0o nIJDVMjC
Hi, I have some questions regarding the IOCP backend when used with bufferevents. How much locking is required in the callbacks? For example if I'm waiting for read events, will it be possible that one read event triggers a read callback and while this is running another read callback is

[Libevent-users] Simple typo fix

2009-05-20 Thread q6Yr7e0o nIJDVMjC
Hi, svn.1296, buffer.h, line 500 should be     @param n_vec the length of vec_out.  If 0, we only count how many instead of     @param n_vec the length of n_vec.  If 0, we only count how many, shouldn't it? ___ Libevent-users mailing list

[Libevent-users] Simple Echo server with libevent 2.0

2009-05-18 Thread q6Yr7e0o nIJDVMjC
Hi, can somebody guide me how to write a simple echo server using libevent 2.0? I've read into the sources of libevent (especially http.c) because i wanted to know how to bind to a socket, accept new connections and read/write async to the network. But there are so many interal functions (like

Re: [Libevent-users] Simple Echo server with libevent 2.0

2009-05-18 Thread q6Yr7e0o nIJDVMjC
Hi For one example of how to use the 2.0.1-alpha API, you could have a look at chapter 1 of      http://www.wangafu.net/~nickm/libevent-book/ . Would it be possible to link that book on http://monkey.org/~provos/libevent/ ? I've long googled for such reference material but didn't find any