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

Skip to content
Commit 6eefa42d authored by Alex Vakulenko's avatar Alex Vakulenko
Browse files

libpdx_uds: Allow to create Endpoint/ClientChannel from a socket pair

This is important to enable Service/Client operation in unit tests.
Being able to create a pair of Unix domain sockets and construct both
Service and Client so that they can talk to each other without having
to create a physical socket file is convenient.

This change makes it possible to create an instance of Endpoint and
ClientChannel classes based just on a pair of sockets (Endpoint does
take another socket to simulate the main endpoint FD to accept incoming
connection on, but it is not used for this, only the shutdown events
are received from that main socket. Endpoint uses the channel FD to
perform actual communication with the client).

Bug: 37443070
Test: `libpdx_uds_tests` pass
Change-Id: Ifa1a9d03b97bd90282a04715c2105ad37a8de936
parent 7038c239
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