Skip to content

netcode.cs#7: mirror netcode#191's two create error codes and the callback refusals - #8

Merged
gafferongames merged 7 commits into
mainfrom
deepseek/netcodecs-7
Sep 13, 2026
Merged

netcode.cs#7: mirror netcode#191's two create error codes and the callback refusals#8
gafferongames merged 7 commits into
mainfrom
deepseek/netcodecs-7

Conversation

@gafferongames

Copy link
Copy Markdown
Contributor

Mirrors the two pieces of surface from mas-bandwidth/netcode#191 (merge fbefafb2) into this port. No wire format change.

Two create-time error codes, mirrored by value

  • ClientCreateError.MissingOverrideCallback = 7
  • ServerCreateError.MissingOverrideCallback = 8

Appended after the existing last member of each enum. Nothing renumbered.
The values match NETCODE_CLIENT_CREATE_ERROR_MISSING_OVERRIDE_CALLBACK 7
and NETCODE_SERVER_CREATE_ERROR_MISSING_OVERRIDE_CALLBACK 8 in netcode.h.

The unchecked callback class

The same create-time refusal as #191, at the same points:

  • src/Client.cs create: OverrideSendAndReceive set without both
    SendPacketOverride and ReceivePacketOverride throws
    NetcodeException carrying ClientCreateError.MissingOverrideCallback,
    instead of dereferencing the null callback on the first update.
  • src/Server.cs create: the same, carrying
    ServerCreateError.MissingOverrideCallback.
  • Client.ConnectLoopback refuses to enter loopback (no state change) when
    SendLoopbackPacket is unset, in every build.
  • Server.ConnectLoopbackClient refuses the slot when SendLoopbackPacket
    is unset, in every build.

Red first

Four tests were added in tests/ClientServer.cs and run before the fix:
the two creates check failed: ( false ) (they wrongly succeeded), and the
two loopback entry points NullReferenceException at the
SendLoopbackPacket! deref. After the fix all four pass.

Gates

  • dotnet build tests/Tests.csproj -c Release — pass
  • dotnet build compat/Compat.csproj -c Release — pass
  • dotnet run -c Release --project tests/Tests.csproj -f net8.0 --no-build
    BLOCKED on this machine: no .NET 8 runtime (Microsoft.NETCore.App 8.0.x);
    the net10.0 leg and soak 2000 pass, and the net8.0 binary passes with the
    documented DOTNET_ROLL_FORWARD=LatestMajor.

rowan-claude and others added 7 commits September 13, 2026 16:48
Mirror the two create-time codes added in mas-bandwidth/netcode#191 by
value: client 7, server 8. Renumber nothing.

Co-Authored-By: DeepSeek worker (nova-swarm) <noreply@mas-bandwidth.com>
…etcode#191)

Four tests mirroring netcode#191: client/server create refuse
override_send_and_receive without both override callbacks, and the two
loopback entry points refuse an unset loopback send callback. Red before
the refusal lands.

Co-Authored-By: DeepSeek worker (nova-swarm) <noreply@mas-bandwidth.com>
At the point named by netcode#191, a client/server create with
override_send_and_receive set refuses unless both override callbacks are
present, carrying the new MISSING_OVERRIDE_CALLBACK create code. The two
loopback entry points refuse an unset loopback send callback in every
build. No wire change.

Co-Authored-By: DeepSeek worker (nova-swarm) <noreply@mas-bandwidth.com>
Co-Authored-By: GPT-5.6 Luna
Co-Authored-By: GPT-5.6 Luna
Fix connect token reuse and restart handling
@gafferongames

Copy link
Copy Markdown
Contributor Author

Stella final integration review at417d8011cbf24384f226d988ad5c6b7b79f53fd1: callback guard diff read in full; token-history stack PR9 now integrated with Alex's independent security clearance and root C1.4.8 pin/interop correction. Root Release build and net10 suite passed; all four C↔C# golden/live legs passed against pinned C47a156b. Combined hosted checks now all green, including native net8/net10 on Linux/macOS, C interoperability and verbatim STANDARD parity. Clear to land the combined repair of #6 and #7. Original standalone PR9 CAA-only check was not treated as full CI.

@gafferongames
gafferongames marked this pull request as ready for review September 13, 2026 22:51
@gafferongames
gafferongames merged commit 9a0a355 into main Sep 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants