GetLocalAddress

From Spheriki

Jump to: navigation, search

Gets the IP address of the current machine Sphere is running on, on a local network.


Contents

Usage

string GetLocalAddress();
  • string is returned, containing the IP address.


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.


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.


See also

Personal tools