Alphabetic list: * Sockets.AbstractSocket:: * Sockets.AbstractSocketImpl:: * Sockets.CAddrInfoStruct:: * Sockets.CSockAddrIn6Struct:: * Sockets.Datagram:: * Sockets.DatagramSocket:: * Sockets.DatagramSocketImpl:: * Sockets.DummyStream:: * Sockets.ICMP6SocketImpl:: * Sockets.ICMPSocketImpl:: * Sockets.IP6Address:: * Sockets.IPAddress:: * Sockets.MulticastSocket:: * Sockets.MulticastSocketImpl:: * Sockets.OOBSocketImpl:: * Sockets.RawSocketImpl:: * Sockets.ReadBuffer:: * Sockets.ServerSocket:: * Sockets.Socket:: * Sockets.SocketAddress:: * Sockets.SocketImpl:: * Sockets.StreamSocket:: * Sockets.TCPSocketImpl:: * Sockets.UDPSocketImpl:: * Sockets.UnixAddress:: * Sockets.UnixDatagramSocketImpl:: * Sockets.UnixSocketImpl:: * Sockets.WriteBuffer::

Class tree:
  (Object) (CObject) (CCompound) (CStruct) * Sockets.CAddrInfoStruct:: * Sockets.CSockAddrIn6Struct:: (Iterable) (Stream) (FileDescriptor) * Sockets.AbstractSocketImpl:: * Sockets.DatagramSocketImpl:: * Sockets.MulticastSocketImpl:: * Sockets.UDPSocketImpl:: * Sockets.OOBSocketImpl:: * Sockets.RawSocketImpl:: * Sockets.ICMP6SocketImpl:: * Sockets.ICMPSocketImpl:: * Sockets.UnixDatagramSocketImpl:: * Sockets.SocketImpl:: * Sockets.TCPSocketImpl:: * Sockets.UnixSocketImpl:: (PositionableStream) (ReadStream) * Sockets.ReadBuffer:: (WriteStream) * Sockets.WriteBuffer:: * Sockets.AbstractSocket:: * Sockets.DatagramSocket:: * Sockets.MulticastSocket:: * Sockets.ServerSocket:: * Sockets.StreamSocket:: * Sockets.Socket:: * Sockets.DummyStream:: * Sockets.Datagram:: * Sockets.SocketAddress:: * Sockets.IP6Address:: * Sockets.IPAddress:: * Sockets.UnixAddress::

Sockets.AbstractSocket
======================

Defined in namespace Sockets
Superclass: Stream
Category: Sockets-Streams

     This class models a client site socket.  A socket is a TCP/IP endpoint for network communications conceptually similar to a file handle.

     This class only takes care of buffering and blocking if requested. It uses an underlying socket implementation object which is a subclass of AbstractSocketImpl.  This is necessary to hide some methods in FileDescriptor that are not relevant to sockets, as well as to implement buffering independently of the implementation nuances required by the different address families.  The address family class (a subclass of SocketAddress) acts as a factory for socket implementation objects.

Sockets.AbstractSocket class: defaults
--------------------------------------

defaultAddressClass
     Answer the default address family to be used.  In the library, the address family is represented by a subclass of SocketAddress which is by default IPAddress.

defaultAddressClass: class
     Set the default address family to be used.  In the library, the address family is represented by a subclass of SocketAddress which is by default IPAddress.

defaultImplementationClassFor: aSocketAddressClass
     Answer the default implementation class.  Depending on the subclass, this might be the default stream socket implementation class of the given address class, or rather its default datagram socket implementation class.

Sockets.AbstractSocket class: instance creation
-----------------------------------------------

new
     This method should not be called for instances of this class.

new: implementation
     Answer a new instance of the receiver, using as the underlying layer the object passed as the `implementation' parameter; the object is probably going to be some kind of AbstractSocketImpl.

new: implClass addressClass: addressClass
     Answer a new instance of the receiver, using as the underlying layer a new instance of `implementationClass' and using the protocol family of `addressClass'.

Sockets.AbstractSocket class: timed-out operations
--------------------------------------------------

checkPeriod
     Answer the period that is to elapse between socket polls if data data is not ready and the connection is still open (in milliseconds)

checkPeriod: anInteger
     Set the period that is to elapse between socket polls if data data is not ready and the connection is still open (in milliseconds)

timeout
     Answer the period that is to elapse between the request for (yet unavailable) data and the moment when the connection is considered dead (in milliseconds)

timeout: anInteger
     Set the period that is to elapse between the request for (yet unavailable) data and the moment when the connection is considered dead (in milliseconds)

Sockets.AbstractSocket class: well known ports
----------------------------------------------

defaultPortAt: protocol
     Answer the port that is used (by default) for the given service (high level protocol)

defaultPortAt: protocol ifAbsent: port
     Answer the port that is used (by default) for the given service (high level protocol), or the specified port if none is registered.

defaultPortAt: protocol put: port
     Associate the given port to the service specified by `protocol'.

portCmdServer
     Answer the port on which the rsh daemon listens

portDNS
     Answer the port on which the DNS listens

portDayTime
     Answer the port on which the TOD service listens

portDiscard
     Answer the port on which the DISCARD service listens

portEcho
     Answer the port on which the ECHO service listens

portExecServer
     Answer the port on which the exec server listens

portFTP
     Answer the port on which the FTP daemon listens

portFinger
     Answer the port on which the finger daemon listens

portGopher
     Answer the port on which the Gopher daemon listens

portHTTP
     Answer the port on which the http daemon listens

portLoginServer
     Answer the port on which the rlogin daemon listens

portNNTP
     Answer the port on which the nntp daemon listens

portNetStat
     Answer the port on which the NETSTAT service listens

portPOP3
     Answer the port on which the pop3 daemon listens

portReserved
     Answer the last port reserved to privileged processes

portSMTP
     Answer the port on which the SMTP daemon listens

portSSH
     Answer the port on which the SSH daemon listens

portSystat
     Answer the port on which the SYSTAT service listens

portTelnet
     Answer the port on which the TELNET daemon listens

portTimeServer
     Answer the port on which the time server listens

portWhois
     Answer the port on which the WHOIS daemon listens

Sockets.AbstractSocket: accessing
---------------------------------

address
     Answer an IP address that is of common interest (this can be either the local or the remote address, according to the definition in the subclass).

available
     Answer whether there is data available on the socket.  Same as #canRead, present for backwards compatibility.

canRead
     Answer whether there is data available on the socket.

canWrite
     Answer whether there is free space in the socket's write buffer.

close
     Close the socket represented by the receiver.

flush
     Flush any buffers used by the receiver.

isOpen
     Answer whether the connection between the receiver and the remote endpoint is still alive.

isPeerAlive
     Answer whether the connection with the peer remote machine is still valid.

localAddress
     Answer the local IP address of the socket.

localPort
     Answer the local IP port of the socket.

port
     Answer an IP port that is of common interest (this can be the port for either the local or remote endpoint, according to the definitions in the subclass

remoteAddress
     Answer the IP address of the socket's remote endpoint.

remotePort
     Answer the IP port of the socket's remote endpoint.

Sockets.AbstractSocket: printing
--------------------------------

printOn: aStream
     Print a representation of the receiver on aStream

Sockets.AbstractSocket: socket options
--------------------------------------

soLinger
     Answer the number of seconds that the socket is allowed to wait if it promises reliable delivery but has unacknowledged/untransmitted packets when it is closed, or nil if those packets are left to their destiny or discarded.

soLinger: linger
     Set the number of seconds that the socket is allowed to wait if it promises reliable delivery but has unacknowledged/untransmitted packets when it is closed.

soLingerOff
     Specify that, even if the socket promises reliable delivery, any packets that are unacknowledged/untransmitted when it is closed are to be left to their destiny or discarded.

species
     Answer `String'.

Sockets.AbstractSocket: stream protocol
---------------------------------------

atEnd
     By default, answer whether the connection is still open.

next
     Read another character from the socket, failing if the connection is dead.

next: n putAll: aCollection startingAt: pos
     Write `char' to the socket, failing if the connection is dead.  The SIGPIPE signal is automatically caught and ignored by the system.

nextPut: char
     Write `char' to the socket, failing if the connection is dead.  The SIGPIPE signal is automatically caught and ignored by the system.

Sockets.AbstractSocket: testing
-------------------------------

isExternalStream
     Answer whether the receiver streams on a file or socket.

Sockets.AbstractSocketImpl
==========================

Defined in namespace Sockets
Superclass: FileDescriptor
Category: Sockets-Protocols

     This abstract class serves as the parent class for socket implementations. The implementation class serves an intermediary to routines that perform the actual socket operations.  It hides the buffering and blocking behavior of the Socket classes.

     A default implementation is provided by each address family, but this can be changed by class methods on SocketAddress sublcasses.

Sockets.AbstractSocketImpl class: abstract
------------------------------------------

addressClass
     Answer the class responsible for handling addresses for the receiver

protocol
     Answer the protocol parameter for `create'

socketType
     Answer the socket type parameter for `create'.

Sockets.AbstractSocketImpl class: C call-outs
---------------------------------------------

accept: socket peer: peer addrLen: len
     Not commented.

bind: socket to: addr addrLen: len
     Not commented.

connect: socket to: addr addrLen: len
     Not commented.

create: family type: type protocol: protocol
     Not commented.

getPeerName: socket addr: addr addrLen: len
     Not commented.

getSockName: socket addr: addr addrLen: len
     Not commented.

listen: socket log: len
     Not commented.

option: socket level: level at: name get: value size: len
     Not commented.

option: socket level: level at: name put: value size: len
     Not commented.

receive: socket buffer: buf size: len flags: flags from: addr size: addrLen
     Not commented.

send: socket buffer: buf size: len flags: flags to: addr size: addrLen
     Not commented.

Sockets.AbstractSocketImpl class: C constants
---------------------------------------------

soLinger
     Not commented.

soReuseAddr
     Not commented.

sockDgram
     Not commented.

sockRDM
     Not commented.

sockRaw
     Not commented.

sockStream
     Not commented.

solSocket
     Not commented.

Sockets.AbstractSocketImpl class: socket creation
-------------------------------------------------

newFor: addressClass
     Create a socket for the receiver.

Sockets.AbstractSocketImpl: accessing
-------------------------------------

connectTo: ipAddress port: port
     Connect the receiver to the given IP address and port. `Connecting' means attaching the remote endpoint of the socket.

localAddress
     Answer the address of the local endpoint of the socket (even if IP is not being used, this identifies the machine that is bound to the socket).

localPort
     Answer the port of the local endpoint of the socket (even if IP is not being used, this identifies the service or process that is bound to the socket).

remoteAddress
     Answer the address of the remote endpoint of the socket (even if IP is not being used, this identifies the machine to which the socket is connected).

remotePort
     Answer the port of the remote endpoint of the socket (even if IP is not being used, this identifies the service or process to which the socket is connected).

Sockets.AbstractSocketImpl: asynchronous operations
---------------------------------------------------

ensureReadable
     If the file is open, wait until data can be read from it.  The wait allows other Processes to run.

ensureWriteable
     If the file is open, wait until we can write to it.  The wait allows other Processes to run.

waitForException
     If the file is open, wait until an exceptional condition (such as presence of out of band data) has occurred on it.  The wait allows other Processes to run.

Sockets.AbstractSocketImpl: C call-outs
---------------------------------------

accept: socket peer: peer addrLen: len
     Not commented.

bind: socket to: addr addrLen: len
     Not commented.

connect: socket to: addr addrLen: len
     Not commented.

create: family type: type protocol: protocol
     Not commented.

getPeerName: socket addr: addr addrLen: len
     Not commented.

getSockName: socket addr: addr addrLen: len
     Not commented.

listen: socket log: len
     Not commented.

option: socket level: level at: name get: value size: len
     Not commented.

option: socket level: level at: name put: value size: len
     Not commented.

receive: socket buffer: buf size: len flags: flags from: addr size: addrLen
     Not commented.

send: socket buffer: buf size: len flags: flags to: addr size: addrLen
     Not commented.

Sockets.AbstractSocketImpl: C constants
---------------------------------------

soError: socket
     Not commented.

Sockets.AbstractSocketImpl: socket operations
---------------------------------------------

accept: implementationClass
     Accept a connection on the receiver, and create a new instance of implementationClass that will deal with the newly created active server socket.

bindTo: ipAddress port: port
     Bind the receiver to the given IP address and port. `Binding' means attaching the local endpoint of the socket.

fileOp: ioFuncIndex
     Private - Used to limit the number of primitives used by FileStreams

fileOp: ioFuncIndex ifFail: aBlock
     Private - Used to limit the number of primitives used by FileStreams.

fileOp: ioFuncIndex with: arg1
     Private - Used to limit the number of primitives used by FileStreams

fileOp: ioFuncIndex with: arg1 ifFail: aBlock
     Private - Used to limit the number of primitives used by FileStreams.

fileOp: ioFuncIndex with: arg1 with: arg2
     Private - Used to limit the number of primitives used by FileStreams

fileOp: ioFuncIndex with: arg1 with: arg2 ifFail: aBlock
     Private - Used to limit the number of primitives used by FileStreams.

fileOp: ioFuncIndex with: arg1 with: arg2 with: arg3
     Private - Used to limit the number of primitives used by FileStreams

fileOp: ioFuncIndex with: arg1 with: arg2 with: arg3 ifFail: aBlock
     Private - Used to limit the number of primitives used by FileStreams.

getSockName
     Retrieve a ByteArray containing a sockaddr_in struct for the local endpoint of the socket.

listen: backlog
     Make the receiver a passive server socket with a pending connections queue of the given size.

Sockets.AbstractSocketImpl: socket options
------------------------------------------

optionAt: opt level: level put: anObject
     Modify the value of a socket option.  The option identifier is in `opt' and the level is in `level'.  anObject can be a boolean, integer, socket address or ByteArray. A layer over this method is provided for the most common socket options, so this will be rarely used.

optionAt: opt level: level size: size
     Answer in a ByteArray of the given size the value of a socket option. The option identifier is in `opt' and the level is in `level'.  A layer over this method is provided for the most common socket options, so this will be rarely used.

soLinger
     Answer the number of seconds by which a `close' operation can block to ensure that all the packets have reliably reached the destination, or nil if those packets are left to their destiny.

soLinger: linger
     Set the number of seconds by which a `close' operation can block to ensure that all the packets have reliably reached the destination. If linger is nil, those packets are left to their destiny.

soReuseAddr
     Answer whether another socket can be bound the same local address as this one.  If you enable this option, you can actually have two sockets with the same Internet port number; but the system won't allow you to use the two identically-named sockets in a way that would confuse the Internet.  The reason for this option is that some higher-level Internet protocols, including FTP, require you to keep reusing the same socket number.

soReuseAddr: aBoolean
     Set whether another socket can be bound the same local address as this one.

valueWithoutBuffering: aBlock
     Evaluate aBlock, ensuring that any data that it writes to the socket is sent immediately to the network.

Sockets.CAddrInfoStruct
=======================

Defined in namespace Sockets
Superclass: CStruct
Category:

Sockets.CAddrInfoStruct class: C call-outs
------------------------------------------

getaddrinfo: name service: servname hints: hints result: res
     Not commented.

Sockets.CAddrInfoStruct: C call-outs
------------------------------------

aiAddr
     Not commented.

aiCanonname
     Not commented.

free
     Not commented.

Sockets.CAddrInfoStruct: C function wrappers
--------------------------------------------

getaddrinfo: name
     Not commented.

getaddrinfo: name service: service
     Not commented.

Sockets.CSockAddrIn6Struct
==========================

Defined in namespace Sockets
Superclass: CStruct
Category:

Sockets.Datagram
================

Defined in namespace Sockets
Superclass: Object
Category: Sockets-Protocols

     This class models a packet of data that is to be sent across the network using a connectionless protocol such as UDP.  It contains the data to be send, as well as the destination address and port.  Note that datagram packets can arrive in any order and are not guaranteed to be delivered at all.

     This class can also be used for receiving data from the network.

Sockets.Datagram class: instance creation
-----------------------------------------

data: aByteArray
     Answer a new datagram with the specified data.

data: aByteArray address: ipAddress port: port
     Answer a new datagram with the specified target socket, and aByteArray as its data.

object: object address: ipAddress port: port
     Serialize the object onto a ByteArray, and create a Datagram with the object as its contents, and the specified receiver. Note that each invocation of this method creates a separate ObjectDumper; if different objects that you're sending are likely to contain references to the same objects, you should use #object:objectDumper:address:port:.

object: object objectDumper: od address: ipAddress port: port
     Serialize the object onto a ByteArray, and create a Datagram with the object as its contents, and the specified receiver.  Serialization takes place through ObjectDumper passed as `od', and the stream attached to the ObjectDumper is resetted every time.  Using this method is indicated if different objects that you're sending are likely to contain references to the same objects.

Sockets.Datagram: accessing
---------------------------

address
     Answer the address of the target socket

address: ipAddress
     Set the address of the target socket

data
     Answer the data attached to the datagram

data: aByteArray
     Set the data attached to the datagram

dataSize
     Answer the size of the message.

dataSize: aSize
     I am called to update the size...

get
     Parse the data attached to the datagram through a newly created ObjectDumper, and answer the resulting object.  This method is complementary to #object:address:port:.

getThrough: objectDumper
     Parse the data attached to the datagram through the given ObjectDumper without touching the stream to which it is attached, and answer the resulting object.  The state of the ObjectDumper, though, is updated.  This method is complementary to #object:objectDumper:address:port:.

port
     Answer the IP port of the target socket

port: thePort
     Set the IP port of the target socket

size
     I determine the size of the datagram. It is either an explicitly specified dataSize, or the size of the whole collection.

Sockets.DatagramSocket
======================

Defined in namespace Sockets
Superclass: Sockets.AbstractSocket
Category: Sockets-Streams

     This class models a connectionless datagram socket that sends individual packets of data across the network.  In the TCP/IP world, this means UDP.  Datagram packets do not have guaranteed delivery, or any guarantee about the order the data will be received on the remote host.

     This class uses an underlying socket implementation object which is a subclass of DatagramSocketImpl.  This is less necessary for datagram sockets than for stream sockets (except for hiding some methods in FileDescriptor that are not relevant to sockets), but it is done for cleanliness and symmetry.

Sockets.DatagramSocket class: accessing
---------------------------------------

defaultBufferSize
     Answer the default maximum size for input datagrams.

defaultBufferSize: size
     Set the default maximum size for input datagrams.

defaultImplementationClassFor: aSocketAddressClass
     Answer the default implementation class.  Depending on the subclass, this might be the default stream socket implementation class of the given address class, or rather its default datagram socket implementation class.

Sockets.DatagramSocket class: initialization
--------------------------------------------

initialize
     Initialize the class to use an input datagram size of 128.

Sockets.DatagramSocket class: instance creation
-----------------------------------------------

local: ipAddressOrString port: remotePort
     Create a new socket and bind it to the given host (passed as a String to be resolved or as an IPAddress), on the given port.

new
     Answer a new datagram socket (by default an UDP socket), without a specified local address and port.

port: localPort
     Create a new socket and bind it to the local host on the given port.

remote: ipAddressOrString port: remotePort local: ipAddress port: localPort
     Create a new socket and bind it to the given host (passed as a String to be resolved or as a SocketAddress), and to the given remotePort. The default destination for the datagrams will be ipAddressOrString (if not nil), on the remotePort port.

Sockets.DatagramSocket: accessing
---------------------------------

address
     Answer the local address.

bufferSize
     Answer the size of the buffer in which datagrams are stored.

bufferSize: size
     Set the size of the buffer in which datagrams are stored.

datagramClass
     Answer the class used by the socket to return datagrams.

next
     Read a datagram on the socket and answer it.

nextPut: aDatagram
     Send the given datagram on the socket.

peek
     Peek for a datagram on the socket and answer it.

peek: datagram
     Peek for a datagram on the socket, store it in `datagram', and answer the datagram itself.

port
     Answer the local port.

receive: datagram
     Read a datagram from the socket, store it in `datagram', and answer the datagram itself.

Sockets.DatagramSocket: direct operations
-----------------------------------------

nextFrom: ipAddress port: port
     Answer the next datagram from the given address and port.

Sockets.DatagramSocketImpl
==========================

Defined in namespace Sockets
Superclass: Sockets.AbstractSocketImpl
Category: Sockets-Protocols

     This abstract class serves as the parent class for datagram socket implementations.

Sockets.DatagramSocketImpl class: parameters
--------------------------------------------

datagramClass
     Answer the datagram class returned by default by instances of this class.

socketType
     Answer the socket type parameter for `create'.

Sockets.DatagramSocketImpl: accessing
-------------------------------------

bufferSize
     Answer the size of the buffer in which datagrams are stored.

bufferSize: size
     Set the size of the buffer in which datagrams are stored.

Sockets.DatagramSocketImpl: C constants
---------------------------------------

ipAddMembership
     Not commented.

ipDropMembership
     Not commented.

ipMulticastIf
     Not commented.

ipMulticastTtl
     Not commented.

msgPeek
     Not commented.

Sockets.DatagramSocketImpl: socket operations
---------------------------------------------

next
     Retrieve a datagram from the receiver, answer a new object of the receiver's datagram class.

nextPut: aDatagram
     Send aDatagram on the socket

peek
     Peek for a datagram on the receiver, answer a new object of the receiver's datagram class.

peek: aDatagram
     Peek for a datagram on the receiver, answer aDatagram modified to contain information on the newly received datagram.

receive: aDatagram
     Retrieve a datagram from the receiver, answer aDatagram modified to contain information on the newly received datagram.

receive: flags datagram: aDatagram
     Receive a new datagram into `datagram', with the given flags, and answer `datagram' itself; this is an abstract method. The flags can be zero to receive the datagram, or `self msgPeek' to only peek for it without removing it from the queue.

send: aDatagram to: theReceiver port: port
     Send aDatagram on the socket to the given receiver and port

Sockets.DummyStream
===================

Defined in namespace Sockets
Superclass: Stream
Category: Sockets-Tests

Sockets.ICMP6SocketImpl
=======================

Defined in namespace Sockets
Superclass: Sockets.RawSocketImpl
Category: Sockets-Protocols

     Unless the application installs its own implementation, this is the default socket implementation that will be used for IPv6 raw sockets.  It uses C call-outs to implement standard BSD style sockets of family AF_INET, type SOCK_RAW, protocol IPPROTO_ICMPV6.

Sockets.ICMP6SocketImpl class: C constants
------------------------------------------

protocol
     Not commented.

Sockets.ICMPSocketImpl
======================

Defined in namespace Sockets
Superclass: Sockets.RawSocketImpl
Category: Sockets-Protocols

     Unless the application installs its own implementation, this is the default socket implementation that will be used for IPv4 raw sockets.  It uses C call-outs to implement standard BSD style sockets of family AF_INET, type SOCK_RAW, protocol IPPROTO_ICMP.

Sockets.ICMPSocketImpl class: C constants
-----------------------------------------

protocol
     Not commented.

Sockets.IP6Address
==================

Defined in namespace Sockets
Superclass: Sockets.SocketAddress
Category: Sockets-Protocols

     This class models an IPv6 address.  It also acts as a factory for IPv6 stream (TCP), datagram (UDP) and raw sockets.

Sockets.IP6Address class: C constants
-------------------------------------

addressFamily
     Not commented.

aiAll
     Not commented.

aiV4mapped
     Not commented.

protocolFamily
     Not commented.

Sockets.IP6Address class: constants
-----------------------------------

addressSize
     Answer the size of an IPv4 address.

version
     Answer the version of IP that the receiver implements.

Sockets.IP6Address class: initialization
----------------------------------------

createLoopbackHost
     Answer an object representing the loopback host in the address family for the receiver.  This is ::1 for IPv4.

createUnknownAddress
     Answer an object representing an unkown address in the address family for the receiver

initialize
     Set up the default implementation classes for the receiver

Sockets.IP6Address class: instance creation
-------------------------------------------

fromArray: parts
     Answer a new IP6Address from an array of numbers; the numbers are to be thought as the colon-separated numbers in the standard numbers-and-colons notation for IPv4 addresses.

fromBytes: aByteArray
     Answer a new IP6Address from a ByteArray containing the bytes in the same order as the digit form: 131.175.6.2 would be represented as #[131 175 6 2].

fromSockAddr: aByteArray port: portAdaptor
     Private - Answer a new IP6Address from a ByteArray containing a C sockaddr_in structure.  The portAdaptor's value is changed to contain the port that the structure refers to.

fromString: aString
     Answer a new IP6Address from a String containing the requested address in digit form.

new
     This method should not be called for instances of this class.

Sockets.IP6Address: accessing
-----------------------------

asByteArray
     Answer a read-only ByteArray of size four containing the receiver's bytes in network order (big-endian)

isMulticast
     Answer whether the receiver reprensents an address reserved for multicast datagram connections

Sockets.IP6Address: printing
----------------------------

printOn: aStream
     Print the receiver in dot notation.

Sockets.IPAddress
=================

Defined in namespace Sockets
Superclass: Sockets.SocketAddress
Category: Sockets-Protocols

     This class models an IPv4 address.  It also acts as a factory for IPv4 stream (TCP), datagram (UDP) and raw sockets.

Sockets.IPAddress class: C constants
------------------------------------

addressFamily
     Not commented.

protocolFamily
     Not commented.

Sockets.IPAddress class: constants
----------------------------------

addressSize
     Answer the size of an IPv4 address.

version
     Answer the version of IP that the receiver implements.

Sockets.IPAddress class: initialization
---------------------------------------

createLoopbackHost
     Answer an object representing the loopback host in the address family for the receiver.  This is 127.0.0.1 for IPv4.

createUnknownAddress
     Answer an object representing an unkown address in the address family for the receiver

initialize
     Set up the default implementation classes for the receiver

Sockets.IPAddress class: instance creation
------------------------------------------

fromArray: parts
     Answer a new IPAddress from an array of numbers; the numbers are to be thought as the dot-separated numbers in the standard numbers-and-dots notation for IPv4 addresses.

fromBytes: aByteArray
     Answer a new IPAddress from a ByteArray containing the bytes in the same order as the digit form: 131.175.6.2 would be represented as #[131 175 6 2].

fromSockAddr: aByteArray port: portAdaptor
     Private - Answer a new IPAddress from a ByteArray containing a C sockaddr_in structure.  The portAdaptor's value is changed to contain the port that the structure refers to.

fromString: aString
     Answer a new IPAddress from a String containing the requested address in digit form.  Hexadecimal forms are not allowed.

     An Internet host address is a number containing four bytes of data. These are divided into two parts, a network number and a local network address number within that network. The network number consists of the first one, two or three bytes; the rest of the bytes are the local address.

     Network numbers are registered with the Network Information Center (NIC), and are divided into three classes--A, B, and C. The local network address numbers of individual machines are registered with the administrator of the particular network.

     Class A networks have single-byte numbers in the range 0 to 127. There are only a small number of Class A networks, but they can each support a very large number of hosts (several millions). Medium-sized Class B networks have two-byte network numbers, with the first byte in the range 128 to 191; they support several thousands of host, but are almost exhausted. Class C networks are the smallest and the most commonly available; they have three-byte network numbers, with the first byte in the range 192-223. Class D (multicast, 224.0.0.0 to 239.255.255.255) and E (research, 240.0.0.0 to 255.255.255.255) also have three-byte network numbers.

     Thus, the first 1, 2, or 3 bytes of an Internet address specifies a network. The remaining bytes of the Internet address specify the address within that network.  The Class A network 0 is reserved for broadcast to all networks. In addition, the host number 0 within each network is reserved for broadcast to all hosts in that network.  The Class A network 127 is reserved for loopback; you can always use the Internet address `127.0.0.1' to refer to the host machine (this is answered by the #loopbackHost class method).

     Since a single machine can be a member of multiple networks, it can have multiple Internet host addresses. However, there is never supposed to be more than one machine with the same host address.

     There are four forms of the standard numbers-and-dots notation for Internet addresses: a.b.c.d specifies all four bytes of the address individually; a.b.c interprets as a 2-byte quantity, which is useful for specifying host addresses in a Class B network with network address number a.b; a.b intrprets the last part of the address as a 3-byte quantity, which is useful for specifying host addresses in a Class A network with network address number a.

     If only one part is given, this corresponds directly to the host address number.

new
     This method should not be called for instances of this class.

with: b1 with: b2 with: b3 with: b4
     Answer a new IPAddress whose bytes (from most-significant to least-significant) are in the parameters.

Sockets.IPAddress: accessing
----------------------------

addressClass
     Answer the `address class' of the receiver (see IPAddress class>>#fromString:)

asByteArray
     Answer a read-only ByteArray of size four containing the receiver's bytes in network order (big-endian)

host
     Answer an host number for the receiver; this is given by the last three bytes for class A addresses, by the last two bytes for class B addresses, else by the last byte.

isMulticast
     Answer whether the receiver reprensents an address reserved for multicast datagram connections

network
     Answer a network number for the receiver; this is given by the first three bytes for class C/D/E addresses, by the first two bytes for class B addresses, else by the first byte.

subnet
     Answer an host number for the receiver; this is 0 for class A addresses, while it is given by the last byte of the network number for class B/C/D/E addresses.

Sockets.IPAddress: printing
---------------------------

printOn: aStream
     Print the receiver in dot notation.

Sockets.MulticastSocket
=======================

Defined in namespace Sockets
Superclass: Sockets.DatagramSocket
Category: Sockets-Streams

     This class models a multicast socket that sends packets to a multicast group.  All members of the group listening on that address and port will receive all the messages sent to the group.

     In the TCP/IP world, these sockets are UDP-based and a multicast group consists of a multicast address (a class D internet address, i.e. one whose most significant bits are 1110), and a well known port number.

Sockets.MulticastSocket: instance creation
------------------------------------------

interface
     Answer the local device supporting the multicast socket.  This is usually set to any local address.

interface: ipAddress
     Set the local device supporting the multicast socket.  This is usually set to any local address.

join: ipAddress
     Join the multicast socket at the given IP address

leave: ipAddress
     Leave the multicast socket at the given IP address

nextPut: packet timeToLive: timeToLive
     Send the datagram with a specific TTL (time-to-live)

timeToLive
     Answer the socket's datagrams' default time-to-live

timeToLive: newTTL
     Set the default time-to-live for the socket's datagrams

Sockets.MulticastSocketImpl
===========================

Defined in namespace Sockets
Superclass: Sockets.DatagramSocketImpl
Category: Sockets-Protocols

     This abstract class serves as the parent class for datagram socket implementations that support multicast.

Sockets.MulticastSocketImpl: multicasting
-----------------------------------------

ipMulticastIf
     Answer the local device for a multicast socket (in the form of an address)

ipMulticastIf: interface
     Set the local device for a multicast socket (in the form of an address, usually anyLocalAddress)

join: ipAddress
     Join the multicast socket at the given address

leave: ipAddress
     Leave the multicast socket at the given address

timeToLive
     Answer the time to live of the datagrams sent through the receiver to a multicast socket.

timeToLive: ttl
     Set the time to live of the datagrams sent through the receiver to a multicast socket.

Sockets.OOBSocketImpl
=====================

Defined in namespace Sockets
Superclass: Sockets.DatagramSocketImpl
Category: Sockets-Protocols

     This abstract class serves as the parent class for socket implementations that send out-of-band data over a stream socket.

Sockets.OOBSocketImpl: C constants
----------------------------------

msgOOB
     Not commented.

Sockets.OOBSocketImpl: implementation
-------------------------------------

canRead
     Answer whether out-of-band data is available on the socket

ensureReadable
     Stop the process until an error occurs or out-of-band data becomes available on the socket

Sockets.RawSocketImpl
=====================

Defined in namespace Sockets
Superclass: Sockets.DatagramSocketImpl
Category: Sockets-Protocols

     This abstract class serves as the parent class for raw socket implementations.  Raw socket packets are modeled as datagrams.

Sockets.RawSocketImpl class: parameters
---------------------------------------

socketType
     Answer the socket type parameter for `create'.

Sockets.ReadBuffer
==================

Defined in namespace Sockets
Superclass: ReadStream
Category: Examples-Useful tools

     I'm a ReadStream that, when the end of the stream is reached, evaluates an user defined block to try to get some more data.

Sockets.ReadBuffer class: instance creation
-------------------------------------------

on: aCollection
     Answer a Stream that uses aCollection as a buffer.  You should ensure that the fillBlock is set before the first operation, because the buffer will report that the data has ended until you set the fillBlock.

Sockets.ReadBuffer: accessing-reading
-------------------------------------

nextAvailable: anInteger into: aCollection startingAt: pos
     Place the next anInteger objects from the receiver into aCollection, starting at position pos.  Return the number of items stored.

nextAvailable: anInteger putAllOn: aStream
     Copy the next anInteger objects from the receiver to aStream. Return the number of items stored.

upTo: anObject
     Returns a collection of the same type that the stream accesses, up to but not including the object anObject.  Returns the entire rest of the stream's contents if anObject is not present.

upToEnd
     Returns a collection of the same type that the stream accesses, up to but not including the object anObject.  Returns the entire rest of the stream's contents if anObject is not present.

Sockets.ReadBuffer: buffer handling
-----------------------------------

atEnd
     Answer whether the data stream has ended.

availableBytes
     Answer how many bytes are available in the buffer.

bufferContents
     Answer the data that is in the buffer, and empty it.

close
     Not commented.

fill
     Fill the buffer with more data if it is empty, and answer true if the fill block was able to read more data.

fillBlock: block
     Set the block that fills the buffer. It receives a collection and the number of bytes to fill in it, and must return the number of bytes actually read

isEmpty
     Answer whether the next input operation will force a buffer fill

isFull
     Answer whether the buffer has been just filled

notEmpty
     Check whether the next input operation will force a buffer fill and answer true if it will not.

pastEnd
     Try to fill the buffer if the data stream has ended.

Sockets.ServerSocket
====================

Defined in namespace Sockets
Superclass: Sockets.AbstractSocket
Category: Sockets-Streams

     This class models server side sockets.  The basic model is that the server socket is created and bound to some well known port.  It then listens for and accepts connections.  At that point the client and server sockets are ready to communicate with one another utilizing whatever application layer protocol they desire.

     As with the other AbstractSocket subclasses, most instance methods of this class simply redirect their calls to an implementation class.

Sockets.ServerSocket class: accessing
-------------------------------------

defaultImplementationClassFor: aSocketAddressClass
     Answer the default implementation class.

Sockets.ServerSocket class: instance creation
---------------------------------------------

defaultQueueSize
     Answer the default length of the queue for pending connections.  When the queue fills, new clients attempting to connect fail until the server has sent #accept to accept a connection from the queue.

port: anInteger
     Answer a new ServerSocket serving on any local address, on the given port, with a pending connections queue of the default length.

port: anInteger bindTo: ipAddress
     Answer a new ServerSocket serving on the given address and port, with a pending connections queue of the default length.

port: anInteger queueSize: backlog
     Answer a new ServerSocket serving on any local address, on the given port, with a pending connections queue of the given length.

port: anInteger queueSize: backlog bindTo: ipAddress
     Answer a new ServerSocket serving on the given address and port, and with a pending connections queue of the given length.

queueSize: backlog
     Answer a new ServerSocket serving on any local address and port, with a pending connections queue of the given length.

queueSize: backlog bindTo: ipAddress
     Answer a new ServerSocket serving on the given local address, and on any port, with a pending connections queue of the given length.

Sockets.ServerSocket: accessing
-------------------------------

accept
     Accept a new connection and create a new instance of Socket if there is one, else answer nil.

accept: socketClass
     Accept a new connection and create a new instance of socketClass if there is one, else answer nil.  This is usually needed only to create DatagramSockets.

address
     Answer the local address

port
     Answer the local port (the port that the passive socket is listening on).

primAccept: socketClass
     Accept a new connection and create a new instance of Socket if there is one, else fail.

waitForConnection
     Wait for a connection to be available, and suspend the currently executing process in the meanwhile.

Sockets.ServerSocket: initializing
----------------------------------

port: anInteger queueSize: backlog bindTo: localAddr
     Initialize the ServerSocket so that it serves on the given address and port, and has a pending connections queue of the given length.

Sockets.Socket
==============

Defined in namespace Sockets
Superclass: Sockets.StreamSocket
Category: Sockets-Streams

     This class adds read and write buffers to the basic model of AbstractSocket.

Sockets.Socket class: accessing
-------------------------------

writeBufferSize
     Answer the size of the write buffer for newly-created sockets

writeBufferSize: anInteger
     Set the size of the write buffer for newly-created sockets

Sockets.Socket class: tests
---------------------------

datagramLoopbackTest
     Send data from one datagram socket to another on the local machine. Tests most of the socket primitives and works with different processes.

datagramLoopbackTestOn: addressClass
     Send data from one datagram socket to another on the local machine. Tests most of the socket primitives and works with different processes.

loopbackTest
     Send data from one socket to another on the local machine. Tests most of the socket primitives.

loopbackTest: bufferSizes
     Send data from one socket to another on the local machine. Tests most of the socket primitives.  The parameter is the size of the input and output buffer sizes.

loopbackTest: bufferSizes addressClass: addressClass
     Send data from one socket to another on the local machine. Tests most of the socket primitives.  The parameters are the size of the input and output buffer sizes, and the address class (family) to use.

loopbackTestOn: addressClass
     Send data from one socket to another on the local machine. Tests most of the socket primitives.  The parameter is the address class (family) to use.

microTest
     Extremely small test (try to receive SMTP header)

producerConsumerTest
     Send data from one datagram socket to another on the local machine. Tests most of the socket primitives and works with different processes.

producerConsumerTestOn: addressClass
     Send data from one socket to another on the local machine. Tests most of the socket primitives and works with different processes.

sendTest
     Send data to the 'discard' socket of localhost.

sendTest: host
     Send data to the 'discard' socket of the given host. Tests the speed of one-way data transfers across the network to the given host. Note that many hosts do not run a discard server.

testPort2For: anAddressClass
     Not commented.

testPortFor: anAddressClass
     Not commented.

tweakedLoopbackTest
     Send data from one socket to another on the local machine, trying to avoid buffering overhead.  Tests most of the socket primitives.  Comparison of the results of loopbackTest and tweakedLoopbackTest should give a measure of the overhead of buffering when sending/receiving large quantities of data.

Sockets.Socket class: well known ports
--------------------------------------

initialize
     Initialize the receiver's defaults

Sockets.Socket: stream protocol
-------------------------------

canWrite
     Answer whether more data is available in the socket's read buffer or from the operating system.

ensureWriteable
     Answer whether more data is available in the socket's read buffer or from the operating system.

flush
     Flush the write buffer to the operating system

next: n putAll: aCollection startingAt: pos
     Write aString to the socket; this acts as a bit-bucket when the socket is closed.  This might yield control to other Smalltalk Processes.

nextPut: char
     Write a character to the socket; this acts as a bit-bucket when the socket is closed.  This might yield control to other Smalltalk Processes.

writeBufferSize: size
     Create a new write buffer of the given size, flushing the old one is needed.  This might yield control to other Smalltalk Processes.

Sockets.SocketAddress
=====================

Defined in namespace Sockets
Superclass: Object
Category: Sockets-Protocols

     This class is the abstract class for machine addresses over a network. It also fulfills the function of the C style functions gethostname(), gethostbyname(), and gethostbyaddr(), resolves machine names into their corresponding numeric addresses (via DNS, /etc/hosts, or other mechanisms) and vice versa.

Sockets.SocketAddress class: abstract
-------------------------------------

extractFromSockAddr: aByteArray port: portAdaptor
     Private - Answer a new SocketAddress from a ByteArray containing a C sockaddr structure.  The portAdaptor's value is changed to contain the port that the structure refers to.

fromSockAddr: aByteArray port: portAdaptor
     Private - Answer a new IPAddress from a ByteArray containing a C sockaddr structure.  The portAdaptor's value is changed to contain the port that the structure refers to.  Raise an error if the address family is unknown.

Sockets.SocketAddress class: accessing
--------------------------------------

anyLocalAddress
     Answer an IPAddress representing a local address.

at: host cache: aBlock
     Private - Answer the list of addresses associated to the given host in the cache.  If the host is not cached yet, evaluate aBlock and cache and answer the result.

defaultDatagramSocketImplClass
     Answer the class that, by default, is used to map between the Socket's protocol and a low-level C interface.

defaultDatagramSocketImplClass: aClass
     Set which class will be used by default to map between the receiver's protocol and a low-level C interface.

defaultRawSocketImplClass
     Answer the class that, by default, is used to map between the Socket's protocol and a low-level C interface.

defaultRawSocketImplClass: aClass
     Set which class will be used by default to map between the receiver's protocol and a low-level C interface.

defaultStreamSocketImplClass
     Answer the class that, by default, is used to map between the Socket's protocol and a low-level C interface.

defaultStreamSocketImplClass: aClass
     Set which class will be used by default to map between the receiver's protocol and a low-level C interface.

isDigitAddress: aString
     Answer whether the receiver can interpret aString as a valid address without going through a resolver.

localHostName
     Answer the name of the local machine.

loopbackHost
     Answer an instance of the receiver representing the local machine (127.0.0.1 in the IPv4 family).

unknownAddress
     Answer an instance of the receiver representing an unknown machine (0.0.0.0 in the IPv4 family).

Sockets.SocketAddress class: C call-outs
----------------------------------------

primLocalName
     Not commented.

primName: address len: len type: addressFamily
     Not commented.

Sockets.SocketAddress class: C constants
----------------------------------------

addressFamily
     Not commented.

aiAddrconfig
     Not commented.

aiCanonname
     Not commented.

protocolFamily
     Not commented.

Sockets.SocketAddress class: creating sockets
---------------------------------------------

newRawSocket
     Create a new raw socket, providing access to low-level network protocols and interfaces for the protocol family represented by the receiver (for example, the C protocol family PF_INET for the IPAddress class) Ordinary user programs usually have no need to use this method.

Sockets.SocketAddress class: host name lookup
---------------------------------------------

allByName: aString
     Answer all the IP addresses that refer to the the given host.  If a digit address is passed in aString, the result is an array containing the single passed address.  If the host could not be resolved to an IP address, answer nil.

byName: aString
     Answer a single IP address that refer to the the given host.  If a digit address is passed in aString, the result is the same as using #fromString:.  If the host could not be resolved to an IP address, answer nil.

Sockets.SocketAddress class: initialization
-------------------------------------------

anyLocalAddress: anObject
     Private - Store an object representing a local address in the address family for the receiver

createLoopbackHost
     Answer an object representing the loopback host in the address family for the receiver.

createUnknownAddress
     Answer an object representing an unkown address in the address family for the receiver

flush
     Flush the cached IP addresses.

initLocalAddresses
     Private - Initialize the anyLocalAddress class-instance variable for the entire hierarchy.

update: aspect
     Flush all the caches for IPAddress subclasses

Sockets.SocketAddress: accessing
--------------------------------

= aSocketAddress
     Answer whether the receiver and aSocketAddress represent the same machine.  The host name is not checked because an IPAddress created before a DNS is activated is named after its numbers-and-dots notation, while the same IPAddress, created when a DNS is active, is named after its resolved name.

asByteArray
     Convert the receiver to a ByteArray passed to the operating system's socket functions)

hash
     Answer an hash value for the receiver

name
     Answer the host name (or the digit notation if the DNS could not resolve the address).  If the DNS answers a different IP address for the same name, the second response is not cached and the digit notation is also returned (somebody's likely playing strange jokes with your DNS).

Sockets.SocketAddress: testing
------------------------------

isMulticast
     Answer whether an address is reserved for multicast connections.

Sockets.SocketImpl
==================

Defined in namespace Sockets
Superclass: Sockets.AbstractSocketImpl
Category: Sockets-Protocols

     This abstract class serves as the parent class for stream socket implementations.

Sockets.SocketImpl class: parameters
------------------------------------

socketType
     Answer the socket type parameter for `create'.

Sockets.SocketImpl: abstract
----------------------------

outOfBandImplClass
     Return an implementation class to be used for out-of-band data on the receiver.

Sockets.SocketImpl: socket operations
-------------------------------------

connectTo: ipAddress port: port
     Try to connect the socket represented by the receiver to the given remote machine.

getPeerName
     Retrieve a ByteArray containing a sockaddr_in struct for the remote endpoint of the socket.

Sockets.StreamSocket
====================

Defined in namespace Sockets
Superclass: Sockets.AbstractSocket
Category: Sockets-Streams

     This class adds a read buffer to the basic model of AbstractSocket.

Sockets.StreamSocket class: accessing
-------------------------------------

defaultImplementationClassFor: aSocketAddressClass
     Answer the default implementation class.  Depending on the subclass, this might be the default stream socket implementation class of the given address class, or rather its default datagram socket implementation class.

readBufferSize
     Answer the size of the read buffer for newly-created sockets

readBufferSize: anInteger
     Set the size of the read buffer for newly-created sockets

Sockets.StreamSocket class: initialize
--------------------------------------

initialize
     Initialize the receiver's defaults

Sockets.StreamSocket class: instance creation
---------------------------------------------

remote: ipAddressOrString port: remotePort
     Create a new socket and connect to the given host (passed as a String to be resolved or as a SocketAddress), and to the given port.

remote: ipAddressOrString port: remotePort local: ipAddress port: localPort
     Create a new socket and connect to the given host (passed as a String to be resolved or as a SocketAddress), and to the given remotePort. Then bind it to the local address passed in ipAddress, on the localPort port; if the former is nil, any local address will do, and if the latter is 0, any local port will do.

Sockets.StreamSocket: accessing
-------------------------------

address
     Answer the address of the remote endpoint

port
     Answer the port of the remote endpoint

Sockets.StreamSocket: accessing-reading
---------------------------------------

nextAvailable: anInteger into: aCollection startingAt: pos
     Place up to anInteger objects from the receiver into aCollection, starting from position pos and stopping if no more data is available.

nextAvailable: anInteger putAllOn: aStream
     Copy up to anInteger objects from the receiver to aStream, stopping if no more data is available.

Sockets.StreamSocket: out-of-band data
--------------------------------------

outOfBand
     Return a datagram socket to be used for receiving out-of-band data on the receiver.

Sockets.StreamSocket: printing
------------------------------

printOn: aStream
     Print a representation of the receiver on aStream

Sockets.StreamSocket: stream protocol
-------------------------------------

atEnd
     Answer whether more data is available on the socket

availableBytes
     Answer how many bytes are available in the socket's read buffer or from the operating system.

bufferContents
     Answer the current contents of the read buffer

canRead
     Answer whether more data is available in the socket's read buffer or from the operating system.

close
     Flush and close the socket.

fill
     Fill the read buffer with data read from the socket

isPeerAlive
     Answer whether the connection with the peer remote machine is still valid.

next
     Read a byte from the socket.  This might yield control to other Smalltalk Processes.

peek
     Read a byte from the socket, without advancing the buffer; answer nil if no more data is available.  This might yield control to other Smalltalk Processes.

peekFor: anObject
     Read a byte from the socket, advancing the buffer only if it matches anObject; answer whether they did match or not.  This might yield control to other Smalltalk Processes.

readBufferSize: size
     Create a new read buffer of the given size (which is only possible before the first read or if the current buffer is empty).

Sockets.TCPSocketImpl
=====================

Defined in namespace Sockets
Superclass: Sockets.SocketImpl
Category: Sockets-Protocols

     Unless the application installs its own implementation, this is the default socket implementation that will be used for IPv4 stream sockets.  It uses C call-outs to implement standard BSD style sockets of family AF_INET and type SOCK_STREAM.

Sockets.TCPSocketImpl class: C constants
----------------------------------------

ipprotoTcp
     Not commented.

protocol
     Not commented.

tcpNodelay
     Not commented.

Sockets.TCPSocketImpl: socket options
-------------------------------------

valueWithoutBuffering: aBlock
     Evaluate aBlock, ensuring that any data that it writes to the socket is sent immediately to the network.

Sockets.UDPSocketImpl
=====================

Defined in namespace Sockets
Superclass: Sockets.MulticastSocketImpl
Category: Sockets-Protocols

     Unless the application installs its own implementation, this is the default socket implementation that will be used for IPv4 datagram sockets.  It uses C call-outs to implement standard BSD style sockets of family AF_INET and type SOCK_DGRAM.

Sockets.UDPSocketImpl class: C constants
----------------------------------------

ipprotoIp
     Not commented.

protocol
     Not commented.

Sockets.UDPSocketImpl: multicasting
-----------------------------------

ipMulticastIf
     Answer the local device for a multicast socket (in the form of an address)

ipMulticastIf: interface
     Set the local device for a multicast socket (in the form of an address, usually anyLocalAddress)

join: ipAddress
     Join the multicast socket at the given address

leave: ipAddress
     Leave the multicast socket at the given address

primJoinLeave: ipAddress option: opt
     Private - Used to join or leave a multicast service.

timeToLive
     Answer the time to live of the datagrams sent through the receiver to a multicast socket.

timeToLive: ttl
     Set the time to live of the datagrams sent through the receiver to a multicast socket.

Sockets.UnixAddress
===================

Defined in namespace Sockets
Superclass: Sockets.SocketAddress
Category: Sockets-Protocols

     This class represents an address for a machine using the AF_UNIX address family.  Since this address family is only used for local sockets, the class is a singleton; the filesystem path to the socket is represented using the port argument to socket functions, as either a String or a File object.

Sockets.UnixAddress class: C constants
--------------------------------------

addressFamily
     Not commented.

protocolFamily
     Not commented.

Sockets.UnixAddress class: initialization
-----------------------------------------

createLoopbackHost
     Answer an object representing the loopback host in the address family for the receiver.  This is 127.0.0.1 for IPv4.

createUnknownAddress
     Answer an object representing an unkown address in the address family for the receiver

initialize
     Set up the default implementation classes for the receiver

Sockets.UnixAddress class: instance creation
--------------------------------------------

fromSockAddr: aByteArray port: portAdaptor
     Private - Answer the unique UnixAddress instance, filling in the portAdaptor's value from a ByteArray containing a C sockaddr_in structure.

uniqueInstance
     Not commented.

Sockets.UnixAddress: accessing
------------------------------

= aSocketAddress
     Answer whether the receiver and aSocketAddress represent the same socket on the same machine.

hash
     Answer an hash value for the receiver

Sockets.UnixAddress: printing
-----------------------------

printOn: aStream
     Print the receiver in dot notation.

Sockets.UnixAddress: testing
----------------------------

isMulticast
     Answer whether an address is reserved for multicast connections.

Sockets.UnixDatagramSocketImpl
==============================

Defined in namespace Sockets
Superclass: Sockets.DatagramSocketImpl
Category: Sockets-Protocols

     This class represents a datagram socket using the AF_UNIX address family. It unlinks the filesystem path when the socket is closed.

Sockets.UnixDatagramSocketImpl: socket operations
-------------------------------------------------

close
     Not commented.

Sockets.UnixSocketImpl
======================

Defined in namespace Sockets
Superclass: Sockets.SocketImpl
Category: Sockets-Protocols

     This class represents a stream socket using the AF_UNIX address family. It unlinks the filesystem path when the socket is closed.

Sockets.UnixSocketImpl: socket operations
-----------------------------------------

close
     Not commented.

Sockets.WriteBuffer
===================

Defined in namespace Sockets
Superclass: WriteStream
Category: Examples-Useful tools

     I'm a WriteStream that, instead of growing the collection, evaluates an user defined block and starts over with the same collection.

Sockets.WriteBuffer: accessing-writing
--------------------------------------

next: n putAll: aCollection startingAt: pos
     Put n characters or bytes of aCollection, starting at the pos-th, in the collection buffer.

Sockets.WriteBuffer: buffer handling
------------------------------------

close
     Not commented.

flush
     Evaluate the flushing block and reset the stream

flushBlock: block
     Set which block will be used to flush the buffer. The block will be evaluated with a collection and an Integer n as parameters, and will have to write the first n elements of the collection.

Sockets.WriteBuffer: testing
----------------------------

isFull
     Not commented.