Re: [Libevent-users] Patch: evhttp_connection_set_local_port

2008-11-04 Thread Richard Jones
I just posted the third article about my comet experiments, which covers why I needed to patch libevent to open >1M connections: http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-3/ On Tue, 2008-11-04 at 11:40 +0000, Richard Jones wrote: > Hi, > In

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, >

[Libevent-users] Patch: evhttp_connection_set_local_port

2008-11-04 Thread Richard Jones
Hi, 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 number is 65536. evhttp_connection_set_local_address already exists and is suitable for this. The ephemeral port allocator, which is

Re: [Libevent-users] Patch: evhttp_connection_set_local_port

2008-11-04 Thread Richard Jones
On Tue, 2008-11-04 at 08:32 -0800, Niels Provos wrote: > On Tue, Nov 4, 2008 at 8:24 AM, Richard Jones <[EMAIL PROTECTED]> wrote: > > Not sure I follow - I'm trying to open 1M connections from one machine > > to another machine. Only 2 machines are involved, and i

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

[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:&#