GetLocalAddress
From Spheriki
Gets the IP address of the current machine Sphere is running on, on a local network.
Contents |
[edit]
Usage
string GetLocalAddress();
- string is returned, containing the IP address.
[edit]
Examples
var ip = GetLocalAddress();
Abort("Hi! Your IP address is " + ip + "!\n");
This will show the IP address of whatever computer Sphere is running on. It should come in the form of four numbers from 1 to 255, separated by single period characters.
[edit]
Notes
- The address returned by this function will be that of the computer on the local network, not necessarily of the computer to the Internet.
[edit]
See also
- GetLocalName()
- ListenOnPort()
- OpenAddress()
- Sphere Socket object
- Abort()

