From 5f5603ce239dce08ae2ec4b0fa828787b220493c Mon Sep 17 00:00:00 2001 From: eunhhu Date: Thu, 1 Oct 2026 09:10:55 +0100 Subject: Deliver wires on the sending loop, a step at a time (017, 2b-2) A wire is now a sender of link/sending.h: its request goes on a non-blocking socket as far as the socket takes it (connect, TLS handshake, write, answer read), and its round waits for the socket or its deadline (10 s with nothing moved). The answer is read as it comes: the head whole, then a sized body counted down, a chunked one (few and small) parsed again as it grows, or a body to the close. The crypto table (version 6) takes the TLS handshake a step at a time, and reads and writes say what they wait for. The owner pushes a wire once a turn, as it does a link. A host whose app sends to ten links and ten wires has 5 threads where it had 24 (none: 3). --- serve/serve.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'serve/serve.c') diff --git a/serve/serve.c b/serve/serve.c index 86e38f8..81a338d 100644 --- a/serve/serve.c +++ b/serve/serve.c @@ -1845,7 +1845,8 @@ static void feed_outlets(Executor *ex) { queued = seq; held += payload.size; } - if (link && queued != before) pure_link_push(link); /* the turn's together */ + if (queued != before && link) pure_link_push(link); /* the turn's together */ + else if (queued != before && wire) pure_wire_push(wire); ex->outlet_from[i] = at; } uint64_t now = ex->local_count ? now_ms() : 0; -- cgit v1.2.3