Programmer's Reference

Instance methods

address
Answers the IP portion of the socket address

address: anAddress
Sets the IP portion of a socket address.

anAddress
Internet address (binary), or INADDRANY.

The parameter anAddress is a 32 bit binary Internet address, or INADDRANY. If the parameter is INADDRANY, a socket can later be bound to a specific port without being bound to a particular internet address. This is convenient for servers that may have more than one internet address.

family
Answers the family part of the socket address.

family: aFamily
Sets the family part of the receiver.

aFamily
Family part of the socket address. Positive integer less than 65536.

port
Answers the port number of the socket address.

port: aPort
Sets the port number of a socket address.

aPort
The port part of a socket address. Positive integer less than 65536.

asString
Answers a string representing the receiver's address in "dot form".

The operation asString returns a string in the base 256 notation d.d.d.d described below.

Network address values specified using the'.' notation take one of the following forms:

a.b.c.d 
a.b.c 
a.b
a

When four parts are specified, each is interpreted as a byte of data and assigned, from left to right, to the four bytes of an Internet address.

When a three part address is specified, the last part is interpreted as a 16-bit quantity and placed in the right most two bytes of the network address. This makes the three part address format convenient for specifying Class B network addresses as 128.net.host.

When a two part address is supplied, the last part is interpreted as a 24-bit quantity and placed in the right most three bytes of the network address. This makes the two part address format convenient for specifying Class A network addresses as net.host.

When only one part is given, the value is stored directly in the network address without any byte rearrangement.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]