This patch converts |StreamSocket| to forward events and data to an
instance of |StreamSocketConsumer|. All users are converted and the
related listener and consumer classes are removed.
With this patch, stream and listening sockets handle the setup of
accepted sockets internally. Sub-classes of |StreamSocket| don't
have to overload StreamSocket's |GetIO| any longer.
This patch cleans up the interface of |StreamSocket|. All arguments
that contain protocol parameters are removed from |Connect|. They are
stored in the connector class. |Connect| now returns error codes. The
method |GetSocketAddr| is unused and not thread-safe and therefore
removed. The method |SendSocketData| for strings is unused and removed.
This patch cleans up the interface of |StreamSocket|. All arguments
that contain protocol parameters are removed from |Connect|. They are
stored in the connector class. |Connect| now returns error codes. The
method |GetSocketAddr| is unused and not thread-safe and therefore
removed. The method |SendSocketData| for strings is unused and removed.
This patch cleans up the inherited methods of |StreamSocket|. Methods
of the same base class are grouped within the file, and each method
is labeled with 'override'.
This patch integrates |ConnectionOrientedSocket| into the hierarchy
of socket I/O classes. In future patches, the class can provide
common interfaces and functionality for all connection-oriented
sockets.
|ReceiveSocketData| receives socket data on the main thread. This
is a specific detail of the current socket classes, which should not
be required by future implementations.
This patch moves the receive method and the corresponding runnable
into socket classes.
This patch renames |SocketConsumerBase| to |DataSocket|, and for the
I/O classes |SocketConsumerIO| to |DataSocketIO|. |DataSocketIO| also
contains send and receive functionality from |SocketBaseIO|.
|DataSocket| is a virtual base class that represents a socket that
transfers data, without a particular constraints to what the data
represents. |DataSocketIO| is the corresponding helper class on the
I/O thread.