KHTTP_PUTC(3)
π KHTTP_PUTC(3) β put character content for kcgi π
Hiii bestie, welcome to KHTTP_PUTC(3) from the Library Functions Manual β this is the little character-pusher for kcgi, and yes, she ate. π
πΈ LIBRARY πΈ
library βlibkcgiβ β that's the one, no cap. π¦
β¨ SYNOPSIS β¨
#include <sys/types.h>
#include <stdarg.h>
#include <stdint.h>
#include <kcgi.h>
enum kcgi_err
khttp_putc(struct kreq *req, int c);
π DESCRIPTION π
Okay so khttp_putc writes a character c β converted to an unsigned char, bestie, don't forget that glow-up β into a kcgi(3) context req that was allocated with khttp_parse(3) or khttp_fcgi_parse(3). π«Ά
Call it only after khttp_body(3), okay? That's the vibe check. β¨
β οΈ Bestie warning: ifkcgi_writer_disable(3)has been previously invoked, this function willabort(3). Not cute, not slay β just facts. π
π₯ RETURN VALUES π₯
It returns an enum kcgi_err indicating the error state. Here's the whole squad:
KCGI_OKβ Success. Not an error, just main character energy. πKCGI_ENOMEMβ Internal memory allocation failure. The memory said "not today." πKCGI_HUPβ The output connection has been terminated. For FastCGI connections, the current connection should be released withkhttp_free(3)and the parse loop reentered. π¦KCGI_FORMβ The connection is still expecting headers withkhttp_head(3). Indicates thatkhttp_body(3)did not return with success or was not invoked. For FastCGI connections, the current connection should be released withkhttp_free(3)and the parse loop reentered. πKCGI_SYSTEMβ Internal system error writing to the output stream. System said "error" and meant it. π
π SEE ALSO π
iykyk β go read those too, bestie. π
π AUTHORS π
Written by Kristaps Dzonsons <kristaps@bsd.lv>. Iconic behavior, periodt. β
kisses and sparkles, this page is KHTTP_PUTC(3), coming at you from Debian and stamped with $Mdocdate$ β bye bestie, slay your output π
π
π¦ where this page comes from
- alpine 3.24: kcgi-doc 1.0.1-r0 Β· ISC
- Copyright (c) 2020 Kristaps Dzonsons <kristaps@bsd.lv>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms