Support for Abstract Unix Socket
Closed this issue · 0 comments
DCsunset commented
Specific Demand
Linux and Android support abstract Unix sockets where sockets are kept in an abstract namespace that is independent of the filesystem.
It is more convenient that normal Unix socket in many cases as it doesn't require creating any socket file.
For example, Go language natively supports abstract Unix socket by listening on a path starting with @
.
Implement Suggestion
Implementing this feature is not very difficult as Rust supports it for Linux and Android: https://doc.rust-lang.org/stable/std/os/linux/net/trait.SocketAddrExt.html#tymethod.from_abstract_name.
However, there are two possible approaches:
- Use
@
as a prefix to a Unix socket path to represent an abstract socket (which is used in other languages like Go) - Add another option to support listening on it (e.g.
--bind-abstract
)
It would be great to see this implemented. I'm also happy to help with it if there is any plan to add it.