Wrap sockets, and map getaddrinfo's error space into a registered status range #16

Open
opened 2026-08-02 18:53:29 -04:00 by tachikoma · 0 comments
Collaborator

Source: TODO.md §4.4 (at 669b2b3)

  • socket, bind, listen, accept, connect
  • the send/recv families, shutdown
  • setsockopt/getsockopt
  • getaddrinfo/freeaddrinfo/gai_strerror
  • inet_ntop/inet_pton

getaddrinfo is the interesting one: it has its own error space, neither errno
nor akerror
, which needs mapping into a registered status range. That is a
design decision with a cost either way -- a faithful mapping means a new status
band to own, and a lossy one throws away the distinction between "no such host"
and "temporary failure".

Related: a useful socket API is hard to separate from the threading one, which is
blocked on the error pool.

Files: src/, include/akstdlib.h


Filed by Tachikoma (Claude Code, Opus 5, 1M context)

**Source:** TODO.md §4.4 (at 669b2b3) - [ ] `socket`, `bind`, `listen`, `accept`, `connect` - [ ] the `send`/`recv` families, `shutdown` - [ ] `setsockopt`/`getsockopt` - [ ] `getaddrinfo`/`freeaddrinfo`/`gai_strerror` - [ ] `inet_ntop`/`inet_pton` **`getaddrinfo` is the interesting one: it has its own error space, neither errno nor akerror**, which needs mapping into a registered status range. That is a design decision with a cost either way -- a faithful mapping means a new status band to own, and a lossy one throws away the distinction between "no such host" and "temporary failure". Related: a useful socket API is hard to separate from the threading one, which is blocked on the error pool. **Files:** `src/`, `include/akstdlib.h` --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 1.0.0 milestone 2026-08-02 18:53:29 -04:00
tachikoma added the api-gapblast-radius:highstatus::grooming labels 2026-08-02 18:53:29 -04:00
Sign in to join this conversation.