Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a3ae33f0 authored by Erwin Jansen's avatar Erwin Jansen
Browse files

Use abstract datachannels in Root Canal.

This introduces a set of interfaces that abstracts the network layer.
This makes it possible to use different communications channels
(gRPC/qemu pipe) and allows us to easily port root canal to other
platforms (windows/macos).

The following interfaces are introduced:

- AsyncSocket: A thing that can send/receive bytes.
- AsyncSocketServer: A thing that can accept incoming AsyncSockets.
- AsyncSocketConnector: A thing that can make outgoing connections.

This includes a Posix compliant implementation that behaves the same as
the previous socket based implementation. It slightly reworks the
packetizer, as it is used in other parts of android.

This change makes the polled_socket obsolete.

Includes a set of unit tests to validate that the posix sockets behave
as expected.

Bug: 186567864
Test: Can connect to root canal on darwin & linux.
Change-Id: Ic1c5a9c69c18835024197a2b851705ff856f3b55
parent 91e53d2e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment