namespace Network

namespace contents
Namespaces
namespace TCP - TCP contains the tcp/ip specific functions and classes.
namespace UDP - The UDP namespace provides a set of tools to access udp streams
namespace Unix - The Unix namespace provides a set of tools to access unix domain socket streams
Classes
class Host - Finds information about a network host
class Service - Stores information about a network service
Functions
function getHostByName(string,number) - Returns a Network.Host object corresponding to the specified host
function getHostname() - Returns the system hostname as a string
function getServiceByName(string,string) - Returns a Service object corresponding to the specified service
function getServiceByPort(number,string) - Returns a Service object corresponding to the specified service
Variables
variable AF_AUTO - This tells a function to use IPV6 if possible or fall back on IPV4
variable AF_IPV4 - This is used to indicate that an IP address is a version 4 one.
variable AF_IPV6 - This is used to indicate that an IP address is a version 6 one.
variable ANY4 - This is used as the mask on which to bind to any IPV4 network address
variable ANY6 - This is used as the mask on which to bind to any IPV6 network address

Functions

function getHostByName Click to go up to the list
Returns a Network.Host object corresponding to the specified host
Declaration:
    function getHostByName(string name, number proto)
Description:
This function searches for the specified host. If it doesn't find a matching host, it returns NULL.
Parameters:
    Parameter #1: string name - The name of the host to look for
    Parameter #2: number reverse - Should the system do a reverse look up of each ip found ?
Returns:
    A Network.Host object, or null on failure

function getHostname Click to go up to the list
Returns the system hostname as a string
Declaration:
    function getHostname()
Returns:
    The system hostname

function getServiceByName Click to go up to the list
Returns a Service object corresponding to the specified service
Declaration:
    function getServiceByName(string name, number proto)
Description:
This function searches the system service database (typically stored in /etc/services) for a service with the specified name and protocol, and if it finds one, it returns the record as an instance of the class Network.Service. If it doesn't find a matching service, it returns NULL. The protocol should be a string, usually either "tcp" or "udp". Alternatively an empty string ("") means "any protocol". Note that if the name you search for is an alias, the name variable of the Service object which is returned will contain the primary name for the service instead of the name you searched for.
Parameters:
    Parameter #1: string name - The name of the service to look for
    Parameter #2: string proto - The protocol of the service to look for
Returns:
    A Service object, or null on failure

function getServiceByPort Click to go up to the list
Returns a Service object corresponding to the specified service
Declaration:
    function getServiceByPort(number port, number proto)
Description:
This function searches the system service database (typically stored in /etc/services) for a service with the specified port number (in host byte order) and protocol, and if it finds one, it returns the record as an instance of the class Network.Service. If it doesn't find a matching service, it returns NULL. The protocol should be a string, usually either "tcp" or "udp". Alternatively an empty string ("") means "any protocol".
Parameters:
    Parameter #1: number port - The port number of the service to look for
    Parameter #2: string proto - The protocol of the service to look for
Returns:
    A Service object, or null on failure

Variables

number AF_AUTO Click to go up to the list
This tells a function to use IPV6 if possible or fall back on IPV4

number AF_IPV4 Click to go up to the list
This is used to indicate that an IP address is a version 4 one.

number AF_IPV6 Click to go up to the list
This is used to indicate that an IP address is a version 6 one.

string ANY4 Click to go up to the list
This is used as the mask on which to bind to any IPV4 network address

string ANY6 Click to go up to the list
This is used as the mask on which to bind to any IPV6 network address

Automatically generated at 12:07PM, Wednesday 25 May 2005 by feritedoc.