[Libevent-users] A patch to test/bench.c

2010-09-06 Thread Shuo Chen
Hi there, I found that test/bench not working in 2.0.6rc. here's a simple fix: diff --git a/test/bench.c b/test/bench.c index 76717d7..de4e814 100644 --- a/test/bench.c +++ b/test/bench.c @@ -85,7 +85,8 @@ run_once(void) static struct timeval ts, te; for (cp = pipes, i = 0; i < n

Re: [Libevent-users] A patch for evrpc, allowing extra argument of request_new and reply_new

2010-04-16 Thread Shuo Chen
0 is stable, though, we're going to try to keep the ABI as stable as > we can. > > -- > Nick Hi Nick and Niels, Thank you, I really appreciate your kind help. Cheers, Shuo Chen *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] evbuffer - how to read without draining data?

2010-03-31 Thread Shuo Chen
can you read the length header (four bytes I guess?) and keep it somewhere in your program, and then wait for enough data to be readable? Regards, Shuo Chen On 3/31/10, Jarod Liu wrote: > Hi, > I writing a eventbuffer socket app. My app packet have a length > header, I want to read

Re: [Libevent-users] A patch for evrpc, allowing extra argument of request_new and reply_new

2010-03-29 Thread Shuo Chen
-2.0.4-alpha-msg-new-with-arg.patch They are used in a simplistic implementation of protobuf RPC using libevent2, with 1000 lines of code. http://code.google.com/p/evproto Thanks, Shuo Chen *** To unsubscribe, send an e-mail to

Re: [Libevent-users] A patch for evrpc, allowing extra argument of request_new and reply_new

2010-03-24 Thread Shuo Chen
rn, I think. So I don't write (msg)_new() function for each message, but reusing one. For code example, please have a look at http://code.google.com/p/evproto/source/browse/trunk/evproto/rpccontroller.cc line 65 http://code.google.com/p/evproto/source/browse/trunk/evproto/rpcserver.cc line 53

Re: [Libevent-users] how to flush output immediately?

2010-03-24 Thread Shuo Chen
Pls google SO_LINGER. On Wed, Mar 24, 2010 at 11:24 PM, Jarod Liu wrote: > I want to implement a server which listen on a port. When new > connection come, write out something, then close the connection. > I try use bufferevent_write put data to output buffer then > bufferevent_free, but I found

[Libevent-users] A patch for evrpc, allowing extra argument of request_new and reply_new

2010-03-20 Thread Shuo Chen
http://evproto.googlecode.com/svn/trunk/libevent-2.0.4-alpha-protobuf-rpc.patch It passes regression test, and doesn't break the current usage I think, just to rerun event_rpcgen.py and recompile the code. Is it possible t

[Libevent-users] Pass in __FILE__ __LINE__ __func__ for better logging?

2010-03-19 Thread Shuo Chen
log file and line info, this may make logging message more useful. Regards, Shuo Chen *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

[Libevent-users] Using timerfd and signalfd on Linux

2010-03-19 Thread Shuo Chen
eventfd on Linux if it's available, which it good I think. Regards, Shuo Chen *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.