Expand description
Low-level Unix domain socket primitives.
This module exposes Linux/Android AF_UNIX stream socket mechanics only:
bind, listen, accept, connect, chmod for filesystem sockets, peer
credentials, and byte I/O through Fd. Callers own all protocol, message
framing, authentication policy, daemon behavior, and socket naming.
Abstract socket names are Linux/Android-only. They are encoded with a
leading NUL byte in sun_path; interior NUL bytes in the caller-provided
abstract name are preserved because the kernel uses the explicit sockaddr
length, not C string termination.
Structs§
- Peer
Cred - Peer process credentials when the platform exposes them.
- Unix
Listener Fd - Owned non-blocking Unix listener descriptor.
- Unix
Socket Bind Options - Bind options for a Unix stream listener.
- Unix
Stream Fd - Owned non-blocking Unix stream descriptor.
Enums§
- Stale
Socket Policy - Explicit stale pathname behavior for filesystem socket binds.
- Unix
Connect Result - Result of starting a non-blocking Unix stream connection.
- Unix
Socket Addr - Unix socket address.
Functions§
- bind_
unix_ listener - Bind and listen on a non-blocking Unix stream socket.
- chmod_
socket_ path - Change mode bits on a Unix socket filesystem path.
- chmod_
unix_ socket - Change mode bits on a Unix socket filesystem path.
- connect_
unix_ stream - Connect a non-blocking Unix stream socket.