Recipes & How-To Guides¶
Production-ready implementation recipes demonstrating how to build robust, multi-platform applications with cais.
Available Recipes¶
- Asynchronous Non-Blocking TCP Echo Server: Build an event-driven server handling multiple simultaneous connections with
cais_socket_pollandsock.select. - Industrial Serial GPS & Sensor Reader: Read continuous NMEA/sensor streams with hardware flow control, timeout recovery, and line status monitoring.
- Defense-in-Depth CLI Sandboxing: Secure a command-line tool using kernel sandboxing (Landlock & Pledge) to restrict filesystem access.
- Centronics Impact Printing & Hardware Handshaking: Transmit raw ESC/P commands to receipt printers while polling hardware status pins.
- Hardened Cryptographic Links with Noise: Build end-to-end encrypted, mutually authenticated TCP channels without certificates or CA bloat.