Hi Nick,
�I just read your message and we faced this problem with Jannik working on the implementation of the network library Ocean.
�Using the 4.2.5beta1U Squeak VM and 1.3 Pharo image, there is primitives in the Socket plusgin to achieve what you are looking for:
hostname := String new: NetNameResolver primHostNameSize.
NetNameResolver primHostNameResult: hostname.�
hostname
I do not remember if these primitives are also present in CogVM.
Hope it helps,
#Luc
Hi,When I call the following on my Mac:NetNameResolver localHostNamethe result is an ip address string eg '192.168.4.174'Is there some configuration work required on the Mac to ensure that #localHostName returns a name rather than ip address.�Currently:$ hostnameNick-Agers-MacBook-Pro2.local$ cat /etc/hostscat /etc/hosts127.0.0.1 localhost# The following lines are desirable for IPv6 capable hosts::1 ip6-localhost ip6-loopbackfe00::0 ip6-localnetff00::0 ip6-mcastprefixff02::1 ip6-allnodesff02::2 ip6-allroutersff02::3 ip6-allhostsI'd be happy with #localHostName returning�the hostname or an entry in /etc/hosts�I've tested on Pharo 1.1.1 & 1.2.1 both using a COG vmThanksNick