[squeak-dev] finding the unix localhost name
Bruce O'Neel
bruce.oneel at pckswarms.ch
Fri Mar 31 07:25:46 UTC 2023
Hi,
For me it does something sensbile on MacOS 10.15.7 and on Windows.
Both with Squeak 6.0.
cheers
bruce
On 2023-03-31T04:06:12.000+02:00, David T. Lewis <lewis at mail.msen.com>
wrote:
> On Wed, Mar 29, 2023 at 06:13:55PM -0700, tim Rowledge wrote:
>> We've had a few discussions about this issue over the years and
>> never really decided on anything more certain than "er, well..."
>>
>> There's certainly a bigger discussion around moving to the 'new
>> networking' setting but for this one particular query it seems to
>> me that using the code currently in NetNameResolver
>> class>>#localHostName that gets ignored by the #useOldNetwork
>> option is a good option. That is,
>>
>> localHostName
>> "Return the local name of this host."
>> "NetNameResolver localHostName"
>>
>> | host |
>> host := String new: NetNameResolver primHostNameSize.
>> NetNameResolver primHostNameResult: host.
>> ^host
>>
>> returns a value that seems to be helpful, and that is retrieved
>> via the unix function gethostname(), which is used by the hostname
>> command. Are there any problems with the idea of using this?
>
> Could someone please test this on Windows and Mac? To test it,
> use Tim's change above, then find the 'Enable IPv6 and new network
> support' preference in category 'General' in the preference browser.
>
> Turn the preference on and off, and see if the localHostName method
> answers something sensible in both cases.
>
> It looks right to me on Linux but results may be different on other
> platforms.
>
> Thanks,
> Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230331/72d68a39/attachment.html>
More information about the Squeak-dev
mailing list
|