hostName := SciSocketManager default getHostName.
hostAddress := SciSocketManager default getHostByName: hostName
SciSocketManager default getHostName
| sciSocket sciSocketAddress aSciHostEnt remoteHostname |
sciSocketAddress := sciSocket getPeerName.
aSciHostEnt := SciSocketManager default getHostBySockName: sciSocketAddress.
remoteHostname := aSciHostEnt name
Hans-Martin wrote:Note that for multi-homed hosts, the hostAddress object may contain more than one IP address, it's up to your application to decide which one you want to use.
public static IPAddress MainIPv4Address(IPHostEntry hostEntry)
foreach (IPAddress eachAddress in hostEntry.AddressList)
if (eachAddress.AddressFamily == AddressFamily.InterNetwork)
Users browsing this forum: Yahoo [Bot] and 1 guest