code wiki / (root) / nx_unix_socket.nx

nx_unix_socket.nx

buildroot/runtime/nx_unix_socket.nx

1931 B60 linesdepth 2pulls 2 transitivereach 24 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_unix_socket.nx nx_x11_connect.nx

imports: nx_syscalls.nx

imported by: nx_x11_connect.nx

structs

none

consts

23const NX_AF_UNIX: i64 = 1

functions

28func nx_unix_connect(path: *u8) -> i64
58func main() -> i64