Implement a device-host messaging service #11
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a basic building block that can be used to let layers act as a network client to a server running on the host.
The design for this module exposes the server as a number of message-oriented endpoint services which are multiplexed on a single socket communications channel. Support message types are synchronous send (tx), asynchronous send (tx_async), and synchronous send-receive (tx_rx).
On Android the device-side socket can use an abstract Unix domain sockets, which can connect to a TCP/IP socket on the host when using "adb reverse" to proxy the connection. On Linux the device-side socket can directly use TCP/IP.
The default host server, which provides some basic services out-of-the-box, is implemented in Python. Client-side implementations of higher-level services, such as a virtual file system, will be provided in follow-on PRs.