KCGI_WRITER_PUTC(3)

πŸ“¦ version 1.0.1, in alpine 3.24

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 with khttp_free(3) and parse loop reentered.
  • KCGI_FORM β€” The connection is still expecting headers with khttp_head(3). Indicates that khttp_body(3) did not return with success or was not invoked. For FastCGI connections, the current connection should be released with khttp_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