[Libevent-users] callback firing many (infinite) times for stdin

2008-11-06 Thread Richard Jones
I'm trying to use libevent for reading data from stdin, and my callback is being called over and over, even though i'm only sending a couple of bytes to stdin. Here's the jist of it: Main: event_init(); event_set(ev, 0 /*stdin*/, EV_READ | EV_PERSIST, read_stdin, NULL); event_add(ev,

Re: [Libevent-users] callback firing many (infinite) times for stdin

2008-11-06 Thread Richard Jones
On Thu, 2008-11-06 at 13:37 -0500, Thomas Harning wrote: On Nov 6, 2008, at 1:30 PM, Richard Jones wrote: .. i see: Read 5 bytes from 0:'12345' Read 0 bytes from 0:'' Read 0 bytes from 0:'' Read 0 bytes from 0:'' ... And the callback keeps firing forever, even tho I'm

Re: [Libevent-users] Patch: evhttp_connection_set_local_port

2008-11-04 Thread Richard Jones
On Tue, 2008-11-04 at 16:12 +, Niels Provos wrote: On Tue, Nov 4, 2008 at 3:40 AM, Richard Jones [EMAIL PROTECTED] wrote: In order to open more than 2^16 connections (HTTP connections in my case) *from* one machine, you need to use multiple local IPs, because the maximum local port

Re: [Libevent-users] Patch: evhttp_connection_set_local_port

2008-11-04 Thread Richard Jones
On Tue, 2008-11-04 at 04:04 -0800, Dan Kegel wrote: On Tue, Nov 4, 2008 at 3:40 AM, Richard Jones [EMAIL PROTECTED] wrote: I added evhttp_connection_set_local_port, which in conjunction with evhttp_connection_set_local_address and some tcp/kernel tuning allowed me to open 1 million http