sconemad

technology, scones, nonsense

Loading...

Profiles

Twitter

GitHub

Launchpad

Subscribe to my RSS Feed

Admin

ip

The ip module allows TCP/IP Version 4 socket addresses, commonly used for making connections over the Internet.

SconeScript Interface

IPAddr ( host : String, service : String or Int, type : String )
Create a socket address for the specified IP host, service and type.

host can be:

  • An internet host name, which will be resolved using the machine's resolver settings when required (usually by DNS lookup).
  • A numeric IP address in the form "aaa.bbb.ccc.ddd".
  • An asterisk "*" - indicating a wildcard address. This is only valid when used with listening sockets and indicates that connections should be accepted on all available local interfaces.

service can be:

  • The name of a standard service, which will be resolved using the machine's resolver settings when required (usually by lookup in the /etc/services file).
  • A port number.

If the address is required for listening, then host should specify a local interface (or, more commonly, "*" for all) and service should specify a currently unused port.

Note that, on most systems, SconeServer will need to be running with root privileges in order to have permission to listen on low numbered ports (<1024).

type can be:

  • "stream" : to indicate a TCP socket address
  • "datagram" : to indicate a UDP socket address.

Updated on 2012-02-02 15:05:37 +0000 | Requested on 2021-05-12 17:10:58 +0000