buffer Class Reference

Buffer that collects data before transmission or reading. More...

#include <buffer.h>

List of all members.

Public Member Functions

 buffer (void)
 ~buffer (void)
void write (const std::string data)
 Write a specific string to the buffer.
int fwrite (int fd)
 Write the buffer with the contents of a file, return 1 when error.
char * writing (int bytes)
 Claim space in the buffer to be able to write data to it.
void wrote (int bytes)
 Tell that you actual wrote this amount of data.
char * send (long *length)
 Finished a set of data to send.
unsigned long bytes (void)
 Number of bytes still the buffer to read.
char * ptr (void)
 Pointer to the current read position.
void done (unsigned long bytes)
 Tell what part of the data you managed to read at this time.


Detailed Description

Buffer that collects data before transmission or reading.

A buffer that accepts data written to it even during transmitting data from another part of the buffer.


Constructor & Destructor Documentation

buffer::buffer ( void   ) 

buffer::~buffer ( void   ) 


Member Function Documentation

void buffer::write ( const std::string  data  ) 

Write a specific string to the buffer.

Beware that this function doesn't write trailing zero's after strings.

int buffer::fwrite ( int  fd  ) 

Write the buffer with the contents of a file, return 1 when error.

char * buffer::writing ( int  bytes  ) 

Claim space in the buffer to be able to write data to it.

void buffer::wrote ( int  bytes  ) 

Tell that you actual wrote this amount of data.

char * buffer::send ( long *  length  ) 

Finished a set of data to send.

unsigned long buffer::bytes ( void   ) 

Number of bytes still the buffer to read.

char * buffer::ptr ( void   ) 

Pointer to the current read position.

void buffer::done ( unsigned long  bytes  ) 

Tell what part of the data you managed to read at this time.


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

Generated on Tue Jan 1 17:30:01 2008 for buffer Class Reference by  doxygen   Visit the project page on SourceForge.net Logo