feat(core): sends return at once and go through Java's transport thread

A send hands its frame to the card and returns, as in Java; the frames
travel while the clock advances. Swift's send ran the network until every
frame had arrived; the option swiftSends keeps that for the Swift
comparison. Waiting calls (TCP connect, acknowledgement) now run event by
event until the answer instead of to the timeout.

UDP and TCP send through a thread per node and protocol (Java's
TransportProtokoll): one segment after the other; while IP waits for ARP,
the next send blocks and a segment from an event queues behind it. Senders
that wait take their turns in the order they came (a fair lock; Java's
leaves the order to chance).

All four ArpRun stories now match Java FILIUS, including when each call
returns. Tests let frames arrive explicitly with letFramesArrive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-30 17:49:05 +00:00
co-authored by Claude Opus 5.5
parent dbbc1fd70d
commit a88fa1512c
7 changed files with 343 additions and 71 deletions
+6
View File
@@ -273,3 +273,9 @@ Gemessen (30.09.2026), was der Kern (nach Swift) anders macht:
erst danach.
* Ein Ping wartet eine RTT auf die Antwort; das „Host unreachable" des
Routers (nach dessen 5,5 s) kommt zu spät.
Der Kern spielt alle vier Abläufe wie Java (`packages/core/test/arpJava.test.ts`:
Frames, Abstände und die Zeiten, zu denen die Aufrufe zurückkehren). Die UDP-Abläufe
seit F2.4b-2: ein Senden kehrt sofort zurück wie in Java (Swifts Senden wartete, bis
alle Frames angekommen waren), und je Knoten und Protokoll sendet ein Transport-Thread
ein Segment nach dem anderen.