Next: , Up: Sockets package

6.1 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.