Commit Graph

18 Commits

Author SHA1 Message Date
Thomas Zimmermann
0f08e85d05 Bug 1168806: Use 'consumer thread' in socket interface, r=kmachulis
The socket IPC interfaces still use 'main thread' in a number of
places. This patch changes all such interfaces and documentation
to speak of 'consumer thread' instead.
2015-06-02 10:01:58 +02:00
Thomas Zimmermann
fb090327db Bug 1168806: Configurable consumer thread for socket IPC classes, r=kmachulis
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.
2015-06-02 10:01:57 +02:00
Thomas Zimmermann
d8e16014cd Bug 1168806: Configurable I/O thread for socket IPC classes, r=kmachulis
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.
2015-06-02 10:01:57 +02:00
Thomas Zimmermann
70111c54d3 Bug 1166638: Use |StreamSocketConsumer| in |StreamSocket|, r=kmachulis, dlee, chucklee, htsai
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.
2015-05-26 13:24:20 +02:00
Thomas Zimmermann
5362ed1bf6 Bug 1164417: Add |ConnectionOrientedSocket::PrepareAccept| for accepting socket connections, r=kmachulis
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.
2015-05-21 13:34:37 +02:00
Thomas Zimmermann
4ae7a8c07b Bug 1164425: Cleanup interfaces of |StreamSocket|, r=kmachulis
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.
2015-05-20 10:50:43 +02:00
Thomas Zimmermann
797b11df18 Bug 1164425: Rename |SocketBase::CloseSocket| to |SocketBase::Close|, r=kmachulis 2015-05-20 10:50:43 +02:00
Carsten "Tomcat" Book
c89b0c098f Backed out changeset 1e93024c9fec (bug 1164425) for bustage 2015-05-20 10:31:55 +02:00
Carsten "Tomcat" Book
e62550b3f7 Backed out changeset 2fd186d1a288 (bug 1164425) 2015-05-20 10:31:09 +02:00
Thomas Zimmermann
f3f2ddd971 Bug 1164425: Cleanup interfaces of |StreamSocket|, r=kmachulis
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.
2015-05-20 09:54:27 +02:00
Thomas Zimmermann
8e10928ea3 Bug 1164425: Rename |SocketBase::CloseSocket| to |SocketBase::Close|, r=kmachulis 2015-05-20 09:54:27 +02:00
Thomas Zimmermann
b61c68c1ca Bug 1159709: Cleanup inherited methods of |StreamSocket|, r=kmachulis
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'.
2015-04-30 12:55:37 +02:00
Thomas Zimmermann
f21f5cd47f Bug 1159709: Integrate |ConnectionOrientedSocket| into socket I/O class hierarchy, r=kmachulis
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.
2015-04-30 12:55:37 +02:00
Thomas Zimmermann
71aaba0c24 Bug 1158876: Move |DataSocket::ReceiveSocketData| into sub classes, r=kmachulis
|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.
2015-04-28 10:18:13 +02:00
Thomas Zimmermann
f1427ebbb7 Bug 1158876: Rename |SocketConsumerBase| to |DataSocket|, r=kmachulis
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.
2015-04-28 10:18:12 +02:00
Thomas Zimmermann
0f58b21c4e Bug 1156352: Remove |UnixSocketRawData| from socket I/O interfaces, r=kmachulis 2015-04-23 13:48:48 +02:00
Ehsan Akhgari
33bb32f549 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Thomas Zimmermann
6124722821 Bug 1093025: Add |StreamSocket|, r=kyle
|StreamSocket| implements a |ConnectionOrientedSocket| for stream
sockets. It utilizes |ListenSocket| to wait for incoming connection
requests.
2014-12-02 15:00:36 -08:00