KCGI_WRITER_PUTC(3)
KCGI_WRITER_PUTC(3) π
okay so bestie, this little icon is from the Library Functions Manual, and it's literally all about writing one single character into a writer. tiny job, main character energy.
π NAME π
kcgi_writer_putc β write into a writer
π LIBRARY π
library βlibkcgiβ β that's the library, no cap.
β¨ SYNOPSIS β¨
#include <sys/types.h>
#include <stdarg.h>
#include <stdint.h>
#include <kcgi.h>
enum kcgi_err
kcgi_writer_putc(struct kcgi_writer *writer, char c);
π¦ DESCRIPTION π¦
The kcgi_writer_putc() function writes character c to a writer channel opened by kcgi_writer_get(3). and yes, it allows writing after kcgi_writer_disable(3), unlike khttp_write(3) β iykyk, that's the whole flex. kcgi_writer_putc() is backed by kcgi_writer_write(3).
π RETURN VALUES π
It returns an enum kcgi_err indicating the error state. vibe check on the possible moods:
KCGI_OKβ Success (not an error). periodt.KCGI_ENOMEMβ Internal memory allocation failure. ugh, the memory said no.KCGI_HUPβ The output connection has been terminated. For FastCGI connections, the current connection should be released withkhttp_free(3)and 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 parse loop reentered.KCGI_SYSTEMβ Internal system error writing to the output stream. not the vibe.
π SEE ALSO π
π AUTHORS π
This function was written by Kristaps Dzonsons <kristaps@bsd.lv>. iconic behavior, honestly.
this page is from Debian, stamped with $Mdocdate$, and filed under KCGI_WRITER_PUTC(3) β mwah π
π¦ where this page comes from
- alpine 3.24: kcgi-doc 1.0.1-r0 Β· ISC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms