remoteName

Type: String

The read-only remoteName property of the TcpIpConnection class contains the remote host name of the remote node in the local HOSTS file or the Domain Name Service (DNS) node after a successful open, openAsynch, listen, or listenAsynch method.

If the name of the remote host cannot be determined, the remoteName property is zero-length.

The code fragment in the following example shows the use of the remoteName property.

if self.tcp.state = Connection.Connected then
    statusLine1.caption := "Connected";
    textBox2.text       := self.tcp.localIpAddress;
    textBox3.text       := self.tcp.remoteIpAddress;
    textBox4.text       := self.tcp.remoteName;
    textBox5.text       := self.tcp.remotePort.String;
endif;