| Syntax |
tcp.getPeerAddress (stream)
|
| Params |
stream is a stream reference returned by tcp.openStream.
|
| Action |
Returns the IP address of the other end of the specified stream
|
| Returns |
The IP address of the other end of the specified stream
|
| Examples |
local (theStream = tcp.openStream ("www.scripting.com", 80));
tcp.addressDecode (tcp.getPeerAddress(theStream));
» "206.204.24.4"
tcp.closeStream (theStream)
|
| Notes |
This verb is most useful inside the callback from tcp.listenStream.
Use tcp.addressDecode to get a human-readable IP address in dotted notation from the output of this verb.
Use tcp.addressToName to get the DNS name of the computer on the other end of the connection
|