Dispatching events via |nsIThread| doesn't work with worker threads. This
patch replaces all uses of |nsIThread| in the socket code by equivalent
uses of |MessageLoop|.
The consumer thread handles socket creation, destruction, and
data processing for socket IPC. Traditionally this has been
done on the main thread.
This patch extends the socket IPC classes to support arbitrary
consumer threads. The thread is configured when establishing a
connection, and performs all of the above operations until the
socket is closed.
The I/O thread sends and receives data on a file descriptor. This
has traditionally been performed on a single I/O thread.
This patch extends the socket IPC classes to support arbitrary I/O
threads. The thread is configured when a connection is established
and used until the socket gets closed.
This patch converts |ListenSocket| to forward events to an instance
of |ListenSocketConsumer|. All users are converted and the related
listener and consumer classes are removed.
This patch cleans up the inherited methods of |ListenSocket|. Methods
of the same base class are grouped within the file, and each method is
labeled with 'override'.
The new class |ListenSocket| listens on Unix sockets for incoming
connections. Accepted connections are handed over to a compatible
connection-oriented socket.