CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
bufchain.h File Reference

Buffer chain implementation for efficient streaming I/O. More...

#include <cx/cx.h>
#include "cx/buffer/buffer.h"
#include "cx/utils/compare.h"

Go to the source code of this file.

Typedefs

typedef bool(* bufchainZCCB) (Buffer buf, size_t off, void *ctx)
 

Functions

void bufchainInit (BufChain *chain, size_t segsz)
 
size_t bufchainRead (BufChain *chain, uint8 *buf, size_t bytes)
 
size_t bufchainReadBuf (BufChain *chain, Buffer buf, size_t maxbytes)
 
size_t bufchainPeek (BufChain *chain, uint8 *buf, size_t off, size_t bytes)
 
size_t bufchainPeekBuf (BufChain *chain, Buffer buf, size_t off, size_t maxbytes)
 
size_t bufchainSkip (BufChain *chain, size_t bytes)
 
size_t bufchainReadZC (BufChain *chain, size_t maxbytes, bufchainZCCB cb, void *ctx)
 
void bufchainWrite (BufChain *chain, const uint8 *buf, size_t bytes)
 
void bufchainWriteBuf (BufChain *chain, Buffer buf)
 
void bufchainWriteZC (BufChain *chain, Buffer *buf)
 
void bufchainDestroy (BufChain *chain)
 

Detailed Description

Buffer chain implementation for efficient streaming I/O.

Definition in file bufchain.h.