|
CX Framework
Cross-platform C utility framework
|
Core stream buffer implementation for efficient data streaming. More...
#include <cx/buffer/bufring.h>#include <cx/closure/closure.h>#include <cx/stype/stype.h>#include <cx/thread/condvar.h>#include <cx/thread/mutex.h>Go to the source code of this file.
Macros | |
| #define | sbufCreate(targetsz, ...) _sbufCreate(targetsz, opt_flags(__VA_ARGS__)) |
| #define | sbufPWrite(sb, buf, sz, ...) _sbufPWrite(sb, buf, sz, opt_flags(__VA_ARGS__)) |
| #define | sbufPWriteStr(sb, str, ...) _sbufPWriteStr(sb, str, opt_flags(__VA_ARGS__)) |
| #define | sbufPWriteLine(sb, str, ...) _sbufPWriteLine(sb, str, opt_flags(__VA_ARGS__)) |
| #define | sbufPWriteEOL(sb, ...) _sbufPWriteEOL(sb, opt_flags(__VA_ARGS__)) |
Typedefs | |
| typedef size_t(* | sbufPullCB) (stvlist *cvars, StreamBuffer *sb, uint8 *buf, size_t sz) |
| typedef void(* | sbufPushCB) (stvlist *cvars, StreamBuffer *sb, const uint8 *buf, size_t sz) |
| typedef void(* | sbufNotifyCB) (stvlist *cvars, StreamBuffer *sb, size_t sz) |
| typedef void(* | sbufResumeCB) (stvlist *cvars, StreamBuffer *sb) |
Enumerations | |
| enum | STREAM_BUFFER_OPT_FLAGS { SBUF_Locked = 0x0004 , SBUF_Wait = 0x0008 } |
| Optional flags for sbufCreate() and the sbufPWrite() family. More... | |
Functions | |
| StreamBuffer * | sbufAcquire (StreamBuffer *sb) |
| void | sbufRelease (StreamBuffer **sb) |
| void | sbufClose (StreamBuffer *sb) |
| void | sbufFinish (StreamBuffer **sb) |
| void | sbufError (StreamBuffer *sb) |
| void | sbufClearError (StreamBuffer *sb) |
| void | sbufSetWatermark (StreamBuffer *sb, size_t high, size_t low) |
| bool | sbufIsLocked (StreamBuffer *sb) |
| bool | sbufIsPull (StreamBuffer *sb) |
| bool | sbufIsPush (StreamBuffer *sb) |
| bool | sbufIsError (StreamBuffer *sb) |
| bool | sbufIsClosed (StreamBuffer *sb) |
| bool | sbufCMore (StreamBuffer *sb) |
| bool | sbufPRegisterPull (StreamBuffer *sb, closure ppull) |
| void | sbufPUnregister (StreamBuffer *sb) |
| bool | sbufPAttached (StreamBuffer *sb) |
| void | sbufPSetResume (StreamBuffer *sb, closure resume) |
| bool | sbufPIsHeld (StreamBuffer *sb) |
| size_t | sbufPAvail (StreamBuffer *sb) |
| bool | sbufPFlush (StreamBuffer *sb) |
| bool | sbufCRegisterPush (StreamBuffer *sb, closure cnotify) |
| bool | sbufCRegisterPushDirect (StreamBuffer *sb, closure cpush) |
| void | sbufCUnregister (StreamBuffer *sb) |
| bool | sbufCAttached (StreamBuffer *sb) |
| size_t | sbufCAvail (StreamBuffer *sb) |
| bool | sbufCRead (StreamBuffer *sb, uint8 *buf, size_t sz, size_t *bytesread) |
| bool | sbufCPeek (StreamBuffer *sb, uint8 *buf, size_t off, size_t sz) |
| bool | sbufCFeed (StreamBuffer *sb, size_t minsz) |
| bool | sbufCSend (StreamBuffer *sb, sbufSendCB func, size_t sz, void *ctx) |
| bool | sbufCSkip (StreamBuffer *sb, size_t bytes) |
Core stream buffer implementation for efficient data streaming.
Definition in file streambuf.h.