On Tue, 2008-11-04 at 16:12 +0000, 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 number is 65536.
> > evhttp_connection_set_local_address already exists and is suitable
> for
> > this.
> 
> Your assessment seems not quite correct.   TCP connections are
> identified by their 4-tuple (src ip, src port, dst ip, dst port).
> So, the 2^16 port limitation comes into play only if you are opening
> connections to the same IP address.   If you talk to multiple
> different IP addresses, port reuse is not a problem.
> 
> Niels.
> 
> 

Not sure I follow - I'm trying to open 1M connections from one machine
to another machine. Only 2 machines are involved, and i'm only concerned
with the client machine - the server already exists.
Given that part of that 4-tuple is a local ip/port pair, I assumed you'd
be limited to 2^16 connections from one local ip, because of the limit
on port numbers?

RJ
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to