xutils Documentation
April 3, 2026 ยท View on GitHub
xutils is a low-level C runtime/framework used by the rest of this project for:
- cryptography and encoding helpers
- dynamic containers and JSON/JWT handling
- sockets, HTTP, WebSocket, MDTP and event loops
- threads, synchronization, filesystem, logging and time utilities
This documentation is written from the actual source in xutils/src, not from symbol names alone so callers can rely on real semantics.
Directory Map
- crypt/README.md: hashing, HMAC, AES, RSA, codec and cipher-chain helpers
- data/README.md: arrays, buffers, maps, hashes, strings, JSON and JWT
- net/README.md: sockets, event loop, HTTP, WebSocket, MDTP, RTP, NTP and address helpers
- sys/README.md: CLI, CPU, monitoring, memory pools, sync, files, time and logging
- xver.md: library version helpers
Reading Conventions
XSTDOK,XSTDNON,XSTDERR,XSTDINVand similar values come fromxstd.h. Most modules use them instead of raw0/-1.- Many binary-producing helpers append an extra trailing
NULbyte for convenience, but the real payload length is still the returned length or*pLength. - Several modules use ownership-transfer APIs. When a function says it "attaches" or "owns" a buffer, the caller must not free the same pointer separately.
- Some modules are Linux-first. The docs note when behavior changes on Windows or when a feature is effectively unavailable outside Linux.
Documentation Scope
Each category contains:
- a category
README.mdwith an overview and link index - one
.mdfile per.cfile in the matching source directory
The intent is operational correctness: help a new engineer use the library safely, understand callback/return conventions, and avoid the sharp edges already present in the codebase.