|
vttp
An HTTP backed Virtual Table extension for SQLite
|
Yet Another Runtime TCP Stream internal functions API. More...
#include <stdio.h>
Go to the source code of this file.
Functions | |
| FILE * | fetch (const char *url, const char *init[4]) |
send() HTTP Request over a TCP socket, wrapping the response socket over the returned FILE * stream. | |
Yet Another Runtime TCP Stream internal functions API.
Helper functions #vttp.c has available.
| FILE * fetch | ( | const char * | url, |
| const char * | init[4] | ||
| ) |
send() HTTP Request over a TCP socket, wrapping the response socket over the returned FILE * stream.
Connects to host at URL over tcp and writes optional HTTP fields in INIT to the request. It returns a readable FILE stream that separates the frames by newlines, so you can read each logical frame one by one easier.
INIT slots are:
INIT[3] is the only slot that fetch will read as a plain uint64.
| NOT_0 | OK - Anything not 0 means the response stream was successfully opened. |
| NULL | Error - Check errno to learn about the error (too many to list here). |