Add a module-lib API for constructing a LocalSocket from an fd.
This allows constructing a LocalSocket from a FileDescriptor referring to an already-connected socket. The LocalSocket can then be used to exchange ancillary filedescriptors and fetch peer socket credentials for the existing FD. The fd is not dup'd or closed by the API, and the caller is responsible for closing it. This is consistent with the constructor of the related LocalServerSocket class, which also takes an fd and does not manage its lifecycle. Bug: 200200870 Test: atest CoreTests:android.net.LocalSocketTest CtsNetTestCases:android.net.cts.LocalSocketTest Change-Id: I86448ba80475c4563194a4a2d9a0c0bbd0b76444
Loading
Please register or sign in to comment