IO:Address

Import List

    Exception
    Exception
    IO
    Object
    Object
    RT0
    RT0
 
Class List
Inet
Inet4
Socket
SocketInet
UnknownHostException
Class Summary: Inet [Detail]
  +---RT0.Object
       |
       +---Object.Object
            |
            +--IO:Address.Inet
Constructor Summary
GetByName(String8): Inet

          Determines the IP address of a host, given the host's DNS name.
Inherited Methods

From RT0.Object:

          Finalize

From Object.Object:

          Equals, HashCode, ToString

 
Class Summary: Inet4 [Detail]
  +---RT0.Object
       |
       +---Object.Object
            |
            +---IO:Address.Inet
                 |
                 +--IO:Address.Inet4
Method Summary
Equals(Object): BOOLEAN

          Indicates whether some other object is "equal to" this one.
HashCode(): Hash

          Returns a hash code value for the object.
ToString(): STRING

          Returns a string representation of the object.
Inherited Methods

From RT0.Object:

          Finalize

From Object.Object:

          Equals, HashCode, ToString

 
Class Summary: Socket [Detail]
  +---RT0.Object
       |
       +---Object.Object
            |
            +--IO:Address.Socket
Method Summary
GetSockAddr(): SockAddr

          Return the socket address s, in the format expected by the functions of libc.
Inherited Methods

From RT0.Object:

          Finalize

From Object.Object:

          Equals, HashCode, ToString

 
Class Summary: SocketInet [Detail]
  +---RT0.Object
       |
       +---Object.Object
            |
            +---IO:Address.Socket
                 |
                 +--IO:Address.SocketInet
Field Summary
host-: Inet

          IP address of the host.
port-: Port

          Port number of the socket.
Constructor Summary
GetSocketInet(Inet, Port): SocketInet

          Return an Internet socket address for the given host address and port number.
Method Summary
Equals(Object): BOOLEAN

          Indicates whether some other object is "equal to" this one.
GetSockAddr(): SockAddr

          Return the socket address s, in the format expected by the functions of libc.
HashCode(): Hash

          Returns a hash code value for the object.
ToString(): STRING

          Returns a string representation of the object.
Inherited Methods

From RT0.Object:

          Finalize

From Object.Object:

          Equals, HashCode, ToString

From IO:Address.Socket:

          GetSockAddr

 
Class Summary: UnknownHostException [Detail]
  +---Exception.Exception
       |
       +---Exception.Checked
            |
            +---IO.Error
                 |
                 +--IO:Address.UnknownHostException
Inherited Methods

From Exception.Exception:

          GetMessage, Name, WriteBacktrace

From IO.Error:

          INIT

 
Type Summary
Port = LONGINT

          Port number of an Internet host.
SockAddr = POINTER TO ARRAY OF CHAR

          
Variable Summary
inet4Any-: Inet4

          Stands for "any incoming address" when binding to an address.
inet4Broadcast-: Inet4

          The address to send a broadcast message.
inet4Loopback-: Inet4

          The internet address `127.0.0.1' referring to this machine, typically called `localhost'.

Class Detail: Inet
Constructor Detail

GetByName

PROCEDURE GetByName(host: String8): Inet
  RAISES UnknownHostException;

Determines the IP address of a host, given the host's DNS name. The host name NIL refers to the local host.

 
Class Detail: Inet4
Method Detail

Equals

PROCEDURE (addr: Inet4) Equals(y: Object): BOOLEAN

Indicates whether some other object is "equal to" this one.

The Object.Equals method implements an equivalence relation:

The `Equals' method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any reference values `x' and `y', this method returns TRUE if and only if `x' and `y' refer to the same object (`x=y' has the value TRUE).

[Description inherited from Equals]

Redefines: Equals, Equals


HashCode

PROCEDURE (addr: Inet4) HashCode(): Hash

Returns a hash code value for the object. This method is supported for the benefit of dictionaries such as those provided by ADT:Dictionary.

The general contract of Object.HashCode is:

As much as is reasonably practical, the Object.HashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required.)

[Description inherited from HashCode]

Redefines: HashCode, HashCode


ToString

PROCEDURE (addr: Inet4) ToString(): STRING

Returns a string representation of the object. Typically, the string is some form of "natural" representation of the value. For complex objects, it should describe the type and essential attributes of the object. The exact format of the returned value is intentionally left vague.

[Description inherited from ToString]

Redefines: ToString, ToString

 
Class Detail: Socket
Method Detail

GetSockAddr

PROCEDURE (s: Socket) GetSockAddr(): SockAddr

Return the socket address s, in the format expected by the functions of libc.

 
Class Detail: SocketInet
Field Detail

host

FIELD host-: Inet

IP address of the host.


port

FIELD port-: Port

Port number of the socket. A number between zero and 65535.

Constructor Detail

GetSocketInet

PROCEDURE GetSocketInet(host: Inet; 
                        port: Port): SocketInet

Return an Internet socket address for the given host address and port number.

Method Detail

Equals

PROCEDURE (s: SocketInet) Equals(y: Object): BOOLEAN

Indicates whether some other object is "equal to" this one.

The Object.Equals method implements an equivalence relation:

The `Equals' method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any reference values `x' and `y', this method returns TRUE if and only if `x' and `y' refer to the same object (`x=y' has the value TRUE).

[Description inherited from Equals]

Redefines: Equals, Equals


GetSockAddr

PROCEDURE (s: SocketInet) GetSockAddr(): SockAddr

Return the socket address s, in the format expected by the functions of libc.

[Description inherited from GetSockAddr]

Redefines: GetSockAddr


HashCode

PROCEDURE (s: SocketInet) HashCode(): Hash

Returns a hash code value for the object. This method is supported for the benefit of dictionaries such as those provided by ADT:Dictionary.

The general contract of Object.HashCode is:

As much as is reasonably practical, the Object.HashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required.)

[Description inherited from HashCode]

Redefines: HashCode, HashCode


ToString

PROCEDURE (s: SocketInet) ToString(): STRING

Returns a string representation of the object. Typically, the string is some form of "natural" representation of the value. For complex objects, it should describe the type and essential attributes of the object. The exact format of the returned value is intentionally left vague.

[Description inherited from ToString]

Redefines: ToString, ToString

 
Class Detail: UnknownHostException
 
Type Detail

Port

TYPE Port = LONGINT

Port number of an Internet host. A value in the range `0..65335'.


SockAddr

TYPE SockAddr = POINTER TO ARRAY OF CHAR
Variable Detail

inet4Any

VAR inet4Any-: Inet4

Stands for "any incoming address" when binding to an address. This is the usual address in the host part of SocketInet to accept Internet connections on a server port.


inet4Broadcast

VAR inet4Broadcast-: Inet4

The address to send a broadcast message.


inet4Loopback

VAR inet4Loopback-: Inet4

The internet address `127.0.0.1' referring to this machine, typically called `localhost'.