DragonFly On-Line Manual Pages

Search: Section:  


KHTTP_WRITE(3)        DragonFly Library Functions Manual        KHTTP_WRITE(3)

NAME

khttp_putc, khttp_puts, khttp_write - write HTTP content data for kcgi

LIBRARY

library "libkcgi"

SYNOPSIS

#include <stdint.h> #include <kcgi.h> void khttp_putc(struct kreq *req, int c); void khttp_puts(struct kreq *req, const char *cp); void khttp_write(struct kreq *req, const char *buf, size_t sz);

DESCRIPTION

The khttp_putc, khttp_puts, and khttp_write functions write HTTP content for a kcgi(3) context allocated with khttp_parse(3) or khttp_fcgi_parse(3). These functions may only be invoked after khttp_body(3), else their behaviour is undefined. khttp_putc emits a single character; khttp_puts emits a nil-terminated character string (note, this does not append a newline like puts(3)), and khttp_write emits a binary buffer buf of size sz.

SEE ALSO

kcgi(3), khttp_body(3), khttp_parse(3)

AUTHORS

The khttp_putc library was written by Kristaps Dzonsons <kristaps@bsd.lv>. DragonFly 6.5-DEVELOPMENT August 7, 2015 DragonFly 6.5-DEVELOPMENT

Search: Section: