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
Loading
Please register or sign in to comment