|
TinyPPP
PPP networking over any Arduino Stream
|
Byte ring buffer with a fixed capacity of N bytes. More...
#include <IPStack.h>
Public Member Functions | |
| size_t | available () const |
| Number of stored bytes. | |
| void | clear () |
| Removes all data. | |
| size_t | contiguous (size_t offset, size_t len, const uint8_t *&p) const |
| Contiguous data at offset (max len): returns the number of bytes at p. | |
| void | discard (size_t len) |
| Removes up to len bytes. | |
| size_t | free () const |
| Free space in bytes. | |
| int | peek () const |
| Returns the next byte without removing it (-1 if empty) | |
| size_t | peek (size_t offset, uint8_t *data, size_t len) const |
| Copies data at offset without removing it. | |
| int | read () |
| Removes and returns one byte (-1 if empty) | |
| size_t | read (uint8_t *data, size_t len) |
| Removes up to len bytes into data. | |
| size_t | size () const |
| Capacity in bytes. | |
| size_t | write (const uint8_t *data, size_t len) |
| Appends data: returns the number of bytes stored. | |
Byte ring buffer with a fixed capacity of N bytes.
Contiguous data at offset (max len): returns the number of bytes at p.
Returns the next byte without removing it (-1 if empty)
Copies data at offset without removing it.
Removes up to len bytes into data.
Appends data: returns the number of bytes stored.