diff options
Diffstat (limited to 'ot_buf.h')
| -rw-r--r-- | ot_buf.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/ot_buf.h b/ot_buf.h deleted file mode 100644 index 7fb944e..0000000 --- a/ot_buf.h +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | /* This software was written by Dirk Engling <erdgeist@erdgeist.org> | ||
| 2 | It is considered beerware. Prost. Skol. Cheers or whatever. */ | ||
| 3 | |||
| 4 | #ifndef OT_BUF_H__ | ||
| 5 | #define OT_BUF_H__ | ||
| 6 | |||
| 7 | #include <stddef.h> | ||
| 8 | |||
| 9 | /* A growable byte buffer, holding an HTTP request that did not arrive in a | ||
| 10 | single packet. Requests that arrive whole are served straight from the | ||
| 11 | worker's input buffer and never come near this. */ | ||
| 12 | typedef struct { | ||
| 13 | char *data; | ||
| 14 | size_t size; | ||
| 15 | } ot_buf; | ||
| 16 | |||
| 17 | /* Append len bytes from src. Returns 0, or -1 if the memory could not be | ||
| 18 | had, in which case the buffer keeps whatever it already held. */ | ||
| 19 | int buf_cat(ot_buf *buf, const void *src, size_t len); | ||
| 20 | |||
| 21 | void buf_truncate(ot_buf *buf, size_t len); | ||
| 22 | |||
| 23 | void buf_reset(ot_buf *buf); | ||
| 24 | |||
| 25 | #endif | ||
