GetLocalName

From Spheriki

Jump to: navigation, search

Gets the name of the computer that Sphere is currently running on, relative to the local network.


Contents

Usage

string GetLocalName();
  • string The name of the computer Sphere is running on in the network.


Examples

function game()
{
  Abort("Local name: " + GetLocalName() + "\n");
}

This will show the name of the computer on the local network. Even if the computer is not on a network, this function is likely to return a name anyway.


Notes

  • If the computer that Sphere is running on is on a local area network, then using the string returned by this function as the hostname is usually sufficient in order to connect to it from Sphere running on other machines in th network.


See also

Personal tools