libassa
3.5.1
|
This class allows to read XDR-encoded data from Socket stream asynchronously and then read from it as if from a stream of intermixed strings, integers and floats. More...
Go to the source code of this file.
Classes | |
class | ASSA::xdrIOBuffer |
Namespaces | |
ASSA | |
This class allows to read XDR-encoded data from Socket stream asynchronously and then read from it as if from a stream of intermixed strings, integers and floats.
Data are XDR-decoded on a fly.
Testing xdrIOBuffer object in conditional statement will produce false if:
- Not entire buffer has been read yet. - Socket stream exceptional condition occured.
Thus, data accumulation and data decoding functions are separated.
Initially, buffer is in waiting state. In this state, xdrIOBuffer object waits for bytes from the Socket stream.
When buffer object becomes full, the state is switched to xmitted. Now, an application code can read data from the buffer. The data will be XDR-decoded.
xdrIOBuffer object yields TRUE in conditional statements only in xmitted state. In other words, buffer is TRUE if it is full, and FALSE otherwise.
xdrIOBuffer can be used only once. You cannot "rewind", and therefore reuse it.
Definition in file xdrIOBuffer.h.