StreamPeerBuffer
Data buffer stream peer.
Data buffer stream peer that uses a byte array as the stream. This object can be used to handle binary data from network sessions. To handle binary data stored in files, can be used directly.
A object keeps an internal cursor which is the offset in bytes to the start of the buffer. Get and put operations are performed at the cursor position and will move the cursor accordingly.
- data_array
The underlying data buffer. Setting this value resets the cursor.
- void clear ( )
Clears the and resets the cursor.
Returns a new with the same data_array content.
- get_position ( ) const
Returns the current cursor position.
- int get_size ( ) const
Returns the size of .
- void resize ( int size )
Moves the cursor to the specified position. must be a valid index of .