nx_unix_socket.nx
buildroot/runtime/nx_unix_socket.nx
about
nx_unix_socket.nx -- Unix-domain stream-socket primitive.
Connects to a filesystem path serving as an AF_UNIX socket
endpoint. Used by X11 (the wire-protocol bridge between bits-up
NishiLang and a WSLg/X11 server on Windows), by D-Bus once we
touch IPC, and by any future local-IPC client.
Bits-up: we open SYS_SOCKET + SYS_CONNECT directly, no libc,
no glibc-style getaddrinfo dance, no third-party tool.
API:
nx_unix_connect(path) -> i64
Opens AF_UNIX SOCK_STREAM socket, connects to `path`, and
returns the connected fd on success. Returns a negative
value (typically a kernel errno code, e.g. -2 ENOENT) on
failure.
license_tier: ORIGINAL
lineage_id: nishi_unix_socket_q10
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_x11_connect.nx
structs
| none |
consts
| 23 | const NX_AF_UNIX: i64 = 1 |
functions
| 28 | func nx_unix_connect(path: *u8) -> i64 |
| 58 | func main() -> i64 |