|
ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
|
Layer 4 (Transport), connectionless: the two sides of UDP, joined. More...
#include "protocore_config.h"Go to the source code of this file.
Layer 4 (Transport), connectionless: the two sides of UDP, joined.
One module with two halves. The listener binds a port, receives on it, and answers from it; the client sends from an ephemeral port and receives nothing. They are the same datagram service seen from either end, so they sit together and a caller reaches whichever it needs through Udp rather than knowing two modules.
Both halves own their stack plumbing (udp_pcb, pbuf) and hand out framed rings instead, so no stack type reaches a layer above this one.
Every send here takes a protocore_ip, never a name or its text. A caller that starts from either turns it into an address once, where it enters, and keeps that: resolving a name or parsing a string per datagram puts that work on the send path of every call.
Each half is reached through its own handle: ::UdpListener and ::UdpClient. The halves are pointers rather than values because a table in one translation unit is not a constant expression in another, so a by-value member could not be initialized from here.
Definition in file udp.h.