Error getting tags :
error 404Error getting tags :
error 404 peerAddress | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
peerAddress
Basics
Expander triangle
Type
Function
Syntax
the peerAddress of host:port[|connectionID] peerAddress(host:port[|connectionID])
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Returns the IP address of the remote system at the other end of a socket.
Examples

peerAddress("ftp.example.org:21")
the peerAddress of "www.example.org:8080|primaryConnection"
the peerAddress of mySocket

Additional Comments
Expander triangle

Use the peerAddress function to find the Internet address of the computer a socket is connected to.

Parameters:

The host is an IP address or domain name.

The port is the port number of the port the socket is connected to.

The connectionID is a string identifying the socket.

Value:

The peerAddress function returns the IP address of the computer. This address is in the form X.X.X.X, where each X is a number with between 1 and 3 digits.

Comments:

The socket must be open. If the specified socket has not been opened, the peerAddress function returns "not an open socket". If you have issued an open socket command to create the socket, you cannot use the peerAddress function until after the socket has been created and the command has completed.

The connectionID is needed only if more than one socket is connected to the same port of the same host. The connectionID is assigned by the accept or open socket command that created the socket.

User Comments
Expander triangle