InetAddress really is an IPv4 address. It depends on the
underlying IPv6 implementation if this class is usable for IPv6
addresses.
instance (id) with (InetHost, pointer, int) (h, a, l);
address
will be deallocated upon the death of the newly created address.)
InetHost host;
pointer address;
int address_length;
(pointer, int) osAddress;
void dealloc;
boolean equal id other;
int hash;
InetHost host;
protected id init (InetHost, pointer, int) (h, a, l);
tom.OutputStream write tom.OutputStream s;
static tom.MutableDictionary hosts_by_name;
static tom.MutableDictionary hosts_by_addr;
static InetHost local_host_any;
instance (id) addressed InetAddress addr;
addr. If the host can be
found in the cache, no lookup is performed.
protected void cacheHost instance (id) h;
h to the cache.
void initialize;
void load tom.Array arguments;
instance (id) named tom.String name;
name. If the host can be found in the
cache, no lookup is performed.
protected instance (id) hostWithAddress InetAddress addr;
addr. Return the host, or
nil if it could not be found. The cache remains unaffected.
protected instance (id) hostWithName tom.String name;
name. Return the host, or
nil if it could not be found. The cache remains unaffected.
protected instance (id) with (tom.Array, tom.Array) (n, a);
n and addresses a.
public tom.Array names;
public tom.Array addresses;
id init (tom.Array, tom.Array) (n, a);
tom.String name;
InetPort is an abstract port on an internet host.
instance (id)
with int port
at InetAddress address;
InetPort with the address and the port.
public InetAddress address;
public int port;
boolean equal id other;
int hash;
protected id
initWithPort int p
at InetAddress a;
tom.OutputStream write tom.OutputStream s;
ConnectedInetPort is a bytestream on a connected TCP socket.
public InetPort server;
ServerInetPort.
InetPort peer;
InetPort [self peer].
protected id
initWithPort int p
at InetAddress a;
p at the address a.
id
initWithPort int p
at InetAddress a
descriptor int d
server ServerInetPort s
peer InetPort pr;
InetPort peer;
void registerForRead DescriptorReadDelegate d;
void registerForWrite DescriptorWriteDelegate d;
ServerInetPort is a TCP port which is listening for connections
to accept.
ConnectedInetPort accept;
protected id
initWithPort int port
at InetAddress address;
port at the address. If
the address is nil, any local address will do; if the port is 0,
it is assigned by the operating system.
void registerForRead DescriptorReadDelegate d;