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

An injected FACTORY for mdl_net_iface_t: which backend, decided once. More...

#include <mdl_net.h>

Detailed Description

An injected FACTORY for mdl_net_iface_t: which backend, decided once.

mdl_net_iface_t makes the request path backend-agnostic; this makes the CONSTRUCTION path backend-agnostic too. Application code that opens a transport for a run used to name a concrete factory, which pinned every mode above it to one build form – the orchestration could only be compiled where libcurl was. A provider replaces that name with a value the composition root supplies: the host CLI wires the libcurl factory, the device wires the C6 link, a test wires a scripted fake, and the mode is the same code.

The backend's caller-owned private storage lives behind ctx, so the provider is also where "who owns the bytes the backend needs" is answered – the composition root, once, rather than each mode on its own stack.

Invariant
open is non-NULL for a usable provider.
ctx outlives every interface open produced from it.
See also
mdl_net_provider_open()
mdl_net_iface_t
Since
0.1.0

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