From c9c0edf5a8fc9f79fff42064db09bc297e117a88 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Wed, 30 Sep 2026 03:03:52 +0100 Subject: Let a receiver whose app is full keep what came, and say so A link's delivery the app had no room for was handed over again at the next turn: a receiver over its memory budget would refuse the same records as fast as the owner could apply them. And its sender, seeing records received but not stored for a second, sent the whole window again every second. Now a host says a delivery found it full (PureLinkDone.full). The receiver keeps the records and hands them over again after a pause, 100 ms doubling to 500 ms, and meanwhile its STORED frames carry flag 2: the app is full and what came is kept. A sender hearing it starts its one-second wait for the save again, and sends none of it again. The spec (012) says both sides; the pause is a local choice that must stay under the sender's wait. pure_link_done takes the PureLinkDone itself. test-link's new case keeps the app full for 5 s: 12 hand-overs meanwhile, taken within 0.5 s of having room, and no record sent again (21,640 without the flag). --- link/link.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'link/link.h') diff --git a/link/link.h b/link/link.h index afe1430..3390a82 100644 --- a/link/link.h +++ b/link/link.h @@ -38,7 +38,7 @@ void pure_link_close(PureLink *); typedef struct PureLinkListener PureLinkListener; PureLinkListener *pure_link_listen(PureLinkReceiver *, unsigned port, char *error, size_t size); bool pure_link_serve(PureLinkListener *, char *error, size_t size); -/* stored: the delivery's save succeeded; gap: it stopped at a gap. */ -void pure_link_done(PureLinkListener *, void *token, uint64_t heard, bool stored, bool gap); +/* How a delivery went: link-protocol.h's PureLinkDone, with its token. */ +void pure_link_done(PureLinkListener *, PureLinkDone); void pure_link_listener_close(PureLinkListener *, PureLinkCounts *counts); #endif -- cgit v1.2.3