Can I use a Unix domain socket on Android (both server and client on the same Android device, for IPC)? Or, must I use LocalSocket?
Asked
Active
Viewed 871 times
1 Answers
1
LocalSocket
and LocalServerSocket
uses Unix domain sockets internally.
https://developer.android.com/reference/android/net/LocalSocket
Creates a (non-server) socket in the UNIX-domain namespace.
https://developer.android.com/reference/android/net/LocalServerSocket
Non-standard class for creating an inbound UNIX-domain socket in the Linux abstract namespace.
Also see: Android create Unix domain socket by bound file descriptor

Remy Lebeau
- 555,201
- 31
- 458
- 770
-
thanks. But found that it's not able to use domain socket in cpp for android, got this error: "bind, error: 'Read-only file system'!" – gpu Dec 19 '22 at 05:55