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

Skip to content
Commit 4c604a29 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.
Test: Can build android.hardware.bluetooth@1.1-service.sim.rc
Test: gd/cert/run
Change-Id: I9b7bef3c4bc4b5c0578bc9ea150ea83963b4c241
parent cc3f95ae
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