TCPConnectionGetPeerName Full Description |
|
Syntaxdefine external stream function TCPConnectionGetPeerName value TCPConnection this-TCPConnection as TCPConnectionGetPeerName Purpose This function is used to get the official name of the peer host on the other side of the connection. If If the passed TCPConnection object is closed or was never connected, then this function returns a distinct value that doesn't look like a valid peer name and causes the TCPConnection object to be in error. If no peer name is available, but the connection is legitimate, this function returns the peer's IP address. Argument:
Example:
local TCPService omdemo-service local TCPConnection client set omdemo-service to TCPServiceOpen at 5600 repeat set client to TCPServiceAcceptConnection omdemo-service output "Request from " || "g"% TCPConnectionGetPeerName client || "%n" ;process request again |