Logo Search packages:      
Sourcecode: akode version File versions  Download package

aKode::ByteBuffer Class Reference

#include <bytebuffer.h>

List of all members.

Detailed Description

A reentrant circular buffer of bytes.

A buffer of bytes to synchronize I/O between two threads, one reading and one getting.

Definition at line 35 of file bytebuffer.h.

Public Member Functions

 ByteBuffer (unsigned int len)
void close ()
unsigned int content ()
bool empty ()
bool eof ()
void flush ()
bool full ()
int read (char *buf, unsigned int len, bool blocking=false)
void release ()
unsigned int space ()
int write (char *buf, unsigned int len, bool blocking=false)

Private Attributes

char * buffer
volatile bool closed
volatile bool flushed
const unsigned int length
pthread_mutex_t mutex
pthread_cond_t not_empty
pthread_cond_t not_full
volatile unsigned int readPos
volatile bool released
volatile unsigned int writePos

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index