Skip to content

[WIP] Add UDP datagram struct and parsing functionality#151

Draft
benaadams with Copilot wants to merge 1 commit into
masterfrom
copilot/add-udp-datagram-struct
Draft

[WIP] Add UDP datagram struct and parsing functionality#151
benaadams with Copilot wants to merge 1 commit into
masterfrom
copilot/add-udp-datagram-struct

Conversation

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt

This section details on the original issue you should resolve

<issue_title>UDP: datagram struct + parsing</issue_title>
<issue_description>## Problem

Magma.Transport.Udp contains only a Header/ subdirectory and a .csproj file. No actual transport logic exists. UDP is the simpler of the two transport protocols and a hard dependency for DNS, QUIC, game networking, and most real-time use cases.

Start with the zero-copy datagram representation.

Sub-tasks

  • UdpDatagram struct wrapping Span<byte> for zero-copy access to source/dest port, length, checksum, payload
  • Construction methods: build a datagram into a pre-allocated buffer
  • IPv4 pseudo-header checksum calculation (reuse Magma.Common)
  • IPv6 pseudo-header checksum calculation

Dependencies

Depends on: #103 (establishes test patterns)
Unlocks: #107 (UDP transmitter/receiver), #106 (UDP tests)

Phase

Phase 1 (Core Protocol & Tooling)</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

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.

UDP: datagram struct + parsing

2 participants