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

2010-03-24 Thread Jarod Liu
All, Thank you. I'll try the callback way. On Thu, Mar 25, 2010 at 12:54 AM, Nick Mathewson wrote: > On Wed, Mar 24, 2010 at 11:24 AM, 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 u

[Libevent-users] Windows 64-bit limit on connections for memcached solved

2010-03-24 Thread Patrick Galbraith
Hi all, I promised to write the list to let everyone know that with the help of Nick, Trond and some tinkering by myself, we have figured out the issue with memcached, particularly on Windows 64-bit. The commit messages explain the fixes. In particular: commit e1e703d2f5d35118e80be6a0e780682

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

2010-03-24 Thread Shuo Chen
Hi Niels, > It breaks regress_rpc.c - because the API for (msg)_new() has changed. Oops, please take a look at a new one, which is shorter than previous one: http://evproto.googlecode.com/svn-history/r8/trunk/libevent-2.0.4-alpha-msg-new-with-arg.patch > However, I am curious, how you can use th

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

2010-03-24 Thread Nick Mathewson
On Wed, Mar 24, 2010 at 11:24 AM, 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 the connection close wi

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

2010-03-24 Thread Hannah Schroeter
Hi! On Wed, Mar 24, 2010 at 11:27:26PM +0800, Shuo Chen wrote: >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

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] how to flush output immediately?

2010-03-24 Thread Jarod Liu
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 the connection close without flush output first. How can I do that with the buffere

[Libevent-users] evutil_closesocket() macro portability.

2010-03-24 Thread Sebastian Sjöberg
Hi, The EVUTIL_CLOSESOCKET() macro requires you to include unistd.h in your source for linux and I don't know what on windows. To ease portablilty wouldn't it be nice if we either turned the macro into a function or included the appropriate header where we define the macro? I'd be happy to pro