<listen> element of the configuration file
Ralf Habacker
ralf.habacker at freenet.de
Tue Mar 6 11:41:49 PST 2007
Havoc Pennington schrieb:
> Ralf Habacker wrote:
>> On windows the autoport selecting behavior is implemented by using
>> port=0 in the listen statement
>>
>> <listen>tcp:host=localhost,port=0</listen>
>>
>> using the following patch.
>>
>
> Nothing windows-specific here that I see, other than possibly (I don't
> know) the details of how we invoke the socket APIs.
Because windows has the same behavior in this manner like unix. The port
number 0 is routed to the bind call, which indicates the os to use a
random free socket port.
>
> I think port=0 should still be disallowed in the text address
> (instead, the port attribute should be omitted to have the OS choose
> the port).
I don't think that this is a good idea, because by default tcp requires
a host *and* a port parameter and an omitted port attribute currently
indicates an error, which should no be changed in my opinion. Instead
setting port=0 indicates that the user knows what he are doing.
Ralf
More information about the dbus
mailing list