added buffer_get_remainder() so I can fetch whatever is left in the buffer

This commit is contained in:
git@daemon.de
2014-02-12 16:46:50 +01:00
parent f849f506cc
commit a78dd9c6eb
2 changed files with 13 additions and 0 deletions

View File

@@ -88,6 +88,9 @@ unsigned char *buffer_get(Buffer *b);
points to b->buf and should not be free'd directly*/
char *buffer_get_str(Buffer *b);
/* fetch whatever is left in the buffer */
unsigned char *buffer_get_remainder(Buffer *b);
/* same as buffer_get() but fetch some data chunk from somewhere
in the middle of the buffer */
size_t buffer_extract(Buffer *b, void *buf, size_t offset, size_t len);