[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mercurial
Subject:    Re: hg serve find open ports
From:       TK Soh <teekaysoh () gmail ! com>
Date:       2010-06-29 13:06:32
Message-ID: AANLkTinkHwl4WPUuy4BfN_Q_0O4Biu3iudwWowspkOFN () mail ! gmail ! com
[Download RAW message or body]

On Tue, Jun 29, 2010 at 7:37 AM, Nicolas Dumazet <nicdumz@gmail.com> wrote:
> 2010/6/29 TK Soh <teekaysoh@gmail.com>:
>> On Tue, Jun 29, 2010 at 6:13 AM, Benoit Boissinot <bboissin@gmail.com> wrote:
>>> hg serve -p 0 does that (you cannot choose the range though)
>>> (see hg help serve in recent hg).
>>
>> Just found out. Unfortunately we are still stuck with 1.4.3. Working
>> on upgrade. Thanks for pointer.
>>
>> BTW, the port number seem a bit too random to me. It'd be nice to be
>> able to spec a range.
>
> If I'm correct, Python cannot do much about it. Python is just using
> ephemeral ports http://en.wikipedia.org/wiki/Ephemeral_port and the
> range is defined by your OS.
> On linux, for example:
>
> $ cat /proc/sys/net/ipv4/ip_local_port_range
> 32768    61000
>
> Which means that for me Python provides me with a port within this range.
> Can I ask why would you need to use a specific pre-determined range?

Can't think of any specific reason right now. Just feel we'd have more
control that way.

> *if* one wanted to use a port in a predefined port, the only approach
> would be trial and error... not a very nice approach.
>
> --
> Nicolas Dumazet — NicDumZ
>
_______________________________________________
Mercurial mailing list
Mercurial@selenic.com
http://selenic.com/mailman/listinfo/mercurial

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic