statically sized ringbuffer class for reading from or writing to data streams like a TCP socket connection.
More...
#include <TcpRingBuffer.h>
template<uint32_t SIZE>
class AzNetworking::TcpRingBuffer< SIZE >
statically sized ringbuffer class for reading from or writing to data streams like a TCP socket connection.
◆ AdvanceReadBuffer()
Advances the ringbuffer read offset by the requested number of bytes.
- Parameters
-
numBytes | number of bytes to advance the ringbuffer read pointer by |
- Returns
- boolean true on success
◆ AdvanceWriteBuffer()
Advances the ringbuffer write offset by the requested number of bytes.
- Parameters
-
numBytes | number of bytes to advance the ringbuffer write pointer by |
- Returns
- boolean true on success
◆ GetReadBufferData()
Returns the start of ringbuffer read memory.
- Returns
- pointer to the start of ringbuffer read memory
◆ GetReadBufferSize()
Returns the size of ringbuffer read memory in bytes.
- Returns
- the size of ringbuffer read memory in bytes
◆ ReserveBlockForWrite()
Returns a pointer into writable memory guaranteed to be of at least numBytes in length.
- Parameters
-
numBytes | maximum number of bytes to be written to the ring-buffer |
- Returns
- pointer to the requested memory, nullptr if the requested size is too large for the ringbuffer to store contiguously
The documentation for this class was generated from the following files:
- Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpRingBuffer.h
- Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpRingBuffer.inl