Flux Reference Manual |
---|
flux-fifo —
#define FLUX_FIFO (fifo) struct FluxFifoNode; enum FluxFifoMode; struct FluxFifo; FluxFifo* flux_fifo_new (guint buffers_min, guint buffers_max, guint buf_size); void flux_fifo_finalize (FluxObject *fifo); gint flux_fifo_get_free_max (FluxFifo *fifo); void flux_fifo_enqueue (FluxFifo *fifo, void *source, guint len); gint flux_fifo_dequeue (FluxFifo *fifo, void *dest, guint len); void* flux_fifo_dequeue_dup (FluxFifo *fifo, guint len); gint flux_fifo_peek (FluxFifo *fifo, void *dest, guint len); gint flux_fifo_drop (FluxFifo *fifo, guint len); gint flux_fifo_drop_all (FluxFifo *fib); void flux_fifo_reset (FluxFifo *fib); void flux_fifo_flush (FluxFifo *fifo); gint flux_fifo_for_data (FluxFifo *fifo, guint len, FluxByteIteratorFunc *func, void *user_data); void flux_fifo_set_mode (FluxFifo *fifo, FluxFifoMode mode); void flux_fifo_set_cipher (FluxFifo *fifo, FluxCipher *cipher); void flux_fifo_set_compression (FluxFifo *fifo, guint compression); gfloat flux_fifo_get_compression_ratio (FluxFifo *fifo); #define flux_fifo_get_used (fib) #define flux_fifo_get_free_current (fib) #define flux_fifo_get_free_min (fib) #define FLUX_FIFO_FOR_DATA (fib, lim, p, len)
typedef enum { FLUX_FIFO_MODE_SIMPLE, FLUX_FIFO_MODE_ENCODE, FLUX_FIFO_MODE_DECODE } FluxFifoMode;
struct FluxFifo { FluxObject object; FluxFifoMode mode; FluxFifoNode *node_out, *node_in; FluxFifoNode *node_cur; guint byte_out, byte_in; guint enqueued; guint buf_size; guint i; gint buffers_min, buffers_max, buffers_cur; FluxCipher *cipher; guint compression_level; gboolean have_compression; z_stream zs; };
FluxFifo* flux_fifo_new (guint buffers_min, guint buffers_max, guint buf_size);
buffers_min : | |
buffers_max : | |
buf_size : | |
Returns : |
void flux_fifo_enqueue (FluxFifo *fifo, void *source, guint len);
fifo : | |
source : | |
len : |
gint flux_fifo_dequeue (FluxFifo *fifo, void *dest, guint len);
fifo : | |
dest : | |
len : | |
Returns : |
gint flux_fifo_peek (FluxFifo *fifo, void *dest, guint len);
fifo : | |
dest : | |
len : | |
Returns : |
gint flux_fifo_for_data (FluxFifo *fifo, guint len, FluxByteIteratorFunc *func, void *user_data);
fifo : | |
len : | |
func : | |
user_data : | |
Returns : |
void flux_fifo_set_cipher (FluxFifo *fifo, FluxCipher *cipher);
fifo : | |
cipher : |
void flux_fifo_set_compression (FluxFifo *fifo, guint compression);
fifo : | |
compression : |
gfloat flux_fifo_get_compression_ratio (FluxFifo *fifo);
fifo : | |
Returns : |
#define flux_fifo_get_free_current(fib) flux_fifo_get_free_max (fib)
fib : |
<< Input/Output | flux-dual-fifo >> |