ip$ = GetConnectionIP(id[, type])
id
. This can either be the identifier of a server connection obtained
by a call to OpenConnection(), the identifier of a client
connection obtained by listening to the OnConnect
and OnReceiveData
events
using InstallEventHandler(), or it can be the
identifier of a UDP object created by CreateUDPObject().
The IP address of the remote side is returned as a string by this function.
The optional argument type
specifies the type of the network object passed in
argument 1. The following types are currently supported by this function:
#NETWORKCONNECTION:
OnConnect
and OnReceiveData
events that can be installed using the
command InstallEventHandler().
#NETWORKUDP:
If you omit the optional type
argument, it will default to type
#NETWORKCONNECTION
.
#NETWORKCONNECTION
) (V8.0)OpenConnection(1, "www.airsoftsoftwair.de", 80) DebugPrint(GetConnectionIP(1), GetConnectionPort(80)) CloseConnection(1)The code above connects to www.airsoftsoftwair.de port 80 and then obtains the IP address of this server.