Skip to content

LocalAddrName Property

The LocalAddrName property is a character vector that specifies the host name of your computer. It may be useful when you have more than one network adapter (perhaps an Ethernet adapter and a token ring adapter) and you wish to avoid hard-coding the IP address.

You can use either LocalAddr or LocalAddrName to identify the local computer; if you specify both properties, the value of LocalAddrName will be ignored.

LocalAddrName may only be specified by a server TCPSocket. Furthermore, it must be specified in the ⎕WC statement that creates the TCPSocket object and it may not subsequently be changed using ⎕WS.

When the specified host name has been resolved to an IP address, the TCPSocket will generate a TCPGotAddr event and update the value of LocalAddr accordingly.

For a client TCPSocket, you may not specify LocalAddrName and ⎕WG returns an empty character vector.

Application

Objects: TCPSocket