NetTransport seam: the wire moves behind an interface

The Steam-multiplayer prerequisite from the design doc: L4NET keeps
hosts, message queues, and the deterministic mesh ordering, while
connect/listen/accept/close, send/receive, startup/cleanup, the local
interface list, and ip[:port] parsing move behind NetTransport
(L4NETTRANSPORT.h). WinsockNetTransport carries the existing TCP
behavior over verbatim - including the connect retry-while-refused
loop the egg-ACK ordering relies on - and is the process default;
NetTransport_Set installs a replacement before the network manager
comes up.

L4STEAMTRANSPORT.h documents the ISteamNetworkingSockets mapping
per method (FakeIP keeps [pilots] entries as IPv4 strings) behind
RP412_STEAM until the Steamworks SDK lands.

Also fixed in passing: the ExclusiveBroadcast path sent
sizeof(network_packet) - four bytes of pointer - instead of the
message size, which would have sheared the stream framing had it
ever fired.

Verified: single-player race cycle (menu, race, results, menu, race)
green; -net 8000 boots, listens for a console through the transport,
and idles stable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-12 19:38:37 -05:00
co-authored by Claude Fable 5
parent 8d7373974f
commit 22421fb418
6 changed files with 640 additions and 250 deletions
+13
View File
@@ -92,6 +92,19 @@ Transport seam: mirror the `RIOBase` pattern at the L4NET layer — a
`L4Host` keeps its identity/queue role; only connect/listen/send/recv move
behind the interface.
**Status (2026-07-12): the seam is IN.** `MUNGA_L4/L4NETTRANSPORT.h/.cpp`
defines `NetTransport` (startup/cleanup, local-address list, ip[:port]
resolve, connect/listen/accept/close, send/receive, remote-address) with
`WinsockNetTransport` as the process default; L4NET.CPP contains no raw
Winsock calls anymore. `MUNGA_L4/L4STEAMTRANSPORT.h` documents the
per-method ISteamNetworkingSockets mapping (FakeIP keeps the `[pilots]`
list as IPv4 strings) and stays behind `RP412_STEAM` until the Steamworks
SDK is dropped at `extern\steamworks` (partner-login download). Remaining
Steam work: SDK drop → implement `SteamNetTransport` → lobby UI in the
front end (owner collects FakeIPs/loadouts via lobby data, builds and
distributes the canonical egg, runs the RPL4CONSOLE marshal) → install
with `NetTransport_Set` at WinMain when launched under Steam.
## 4. Implementation options (decide here)
**A. In-engine front end (recommended).** Port the egg builder (~300 lines: