2005/5/9

     
 

class TransRateReader

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::net::TransRateReader Class Reference

#include <TransRateReader.h>

Inheritance diagram for acdk::net::TransRateReader:

acdk::io::AbstractFilterReader acdk::io::AbstractReader acdk::io::FilterReader acdk::lang::Object acdk::io::Reader acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

A Reader Filter which limits the tranfer rate.

Author:
Roger Rene Kommer
Version:
Revision
1.9
Date:
Date
2005/02/05 10:45:29


Public Member Functions

 TransRateReader (IN(::acdk::io::RReader) in, int bytesPerSecond)
virtual int read ()
 read a single byte from stream

virtual int read (IN(RbyteArray) buffer, int offset=0, int len=-1)
 read the len bytes into buffer at offset of the buffer

virtual int read (byte *buffer, int offset, int len)
void setBytesPerSecondRate (int newrate)

Public Attributes

int _bytePerSecondRate
int _bytesRead
int _bytesWhileSleepASec
tick_t _lastReadTick
int _blockSize
RTransListener _listener


Constructor & Destructor Documentation

acdk::net::TransRateReader::TransRateReader IN(::acdk::io::RReader in,
int  bytesPerSecond
[inline]
 


Member Function Documentation

virtual int acdk::net::TransRateReader::read byte buffer,
int  offset,
int  len
[virtual]
 

See also:
other read(RbyteArray, int, int)

Reimplemented from acdk::io::AbstractFilterReader.

virtual int acdk::net::TransRateReader::read IN(RbyteArray buffer,
int  offset = 0,
int  len = -1
[inline, virtual]
 

read the len bytes into buffer at offset of the buffer

Parameters:
buffer where to write the bytes
offset offset to write into buffer
len how many bytes to read. if == -1 read into many bytes, that fits into buffer (buffer->length() - offset) ``
Returns:
number of bytes readed. may less than input if EOS is reached
Exceptions:
EOF exception, if trying to read behind EOS

Reimplemented from acdk::io::AbstractFilterReader.

virtual int acdk::net::TransRateReader::read  )  [inline, virtual]
 

read a single byte from stream

Returns:
the byte readed or -1 if EOS.
Exceptions:
EOF exception, if trying to read behind EOS

Reimplemented from acdk::io::AbstractFilterReader.

void acdk::net::TransRateReader::setBytesPerSecondRate int  newrate  )  [inline]
 


Member Data Documentation

int acdk::net::TransRateReader::_blockSize
 

int acdk::net::TransRateReader::_bytePerSecondRate
 

int acdk::net::TransRateReader::_bytesRead
 

int acdk::net::TransRateReader::_bytesWhileSleepASec
 

tick_t acdk::net::TransRateReader::_lastReadTick
 

RTransListener acdk::net::TransRateReader::_listener