ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
buf_sink_t Struct Reference

Bounded-buffer sink state for a page fetch. More...

#include <mdl_net_curl_internal.h>

Data Fields

char * buf
 Destination buffer.
size_t cap
 Capacity in bytes.
size_t len
 Bytes written so far.
bool overflow
 Set once the body exceeds cap.

Detailed Description

Bounded-buffer sink state for a page fetch.

Handed to priv_mdl_net_curl_buf_write as libcurl's write-data. The write callback appends into buf until cap is reached, then latches overflow and aborts the transfer.

Invariant
len <= cap whenever overflow is false.
See also
priv_mdl_net_curl_buf_write()
Since
0.1.0

Definition at line 40 of file mdl_net_curl_internal.h.

Field Documentation

◆ buf

char* buf_sink_t::buf

Destination buffer.

Definition at line 41 of file mdl_net_curl_internal.h.

Referenced by priv_mdl_net_curl_buf_write().

◆ cap

size_t buf_sink_t::cap

Capacity in bytes.

Definition at line 42 of file mdl_net_curl_internal.h.

Referenced by priv_mdl_net_curl_buf_write().

◆ len

size_t buf_sink_t::len

Bytes written so far.

Definition at line 43 of file mdl_net_curl_internal.h.

Referenced by internal_curl_get_buf(), and priv_mdl_net_curl_buf_write().

◆ overflow

bool buf_sink_t::overflow

Set once the body exceeds cap.

Definition at line 44 of file mdl_net_curl_internal.h.

Referenced by internal_curl_get_buf(), and priv_mdl_net_curl_buf_write().


The documentation for this struct was generated from the following file: