CNA-GAP-072: SendDataOptions cannot express XNA's combined Chat flags, and chat packets are always sent reliably
Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit b0e97bb1; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
XNA's SendDataOptions is a [Flags] enum whose Chat flag combines with Reliable and InOrder (values 5 to 7); CNA's is a plain enum 0 to 4 without bitwise operators, and the packet codec sends Chat, and any other value, reliably.
- Identifier
CNA-GAP-072- Category
- Functional gap
- Subsystem
- Networking & gamer services
- Status
- Open
- Verified against
- CNA
b0e97bb1(b0e97bb1bb876f9b3edd6f4ff1ef3067908ae8ac) - Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- Yes: see Current tests
- Affected contract
- Microsoft::Xna::Framework::Net::SendDataOptions and LocalNetworkGamer::SendData(..., SendDataOptions)
Expected behaviour
XNA 4.0 declares SendDataOptions as [Flags] (decompiled Microsoft.Xna.Framework.Net; read, not executed): None 0, Reliable 1, InOrder 2, ReliableInOrder 3 and Chat 4, and documents that Chat "can be combined with either or both of the Reliable and InOrder flags", with ordered chat packets ordered relative to other chat packets only.
Actual behaviour at TARGET
SendDataOptions.hpp declares a plain enum class with values 0 to 4 and no bitwise operators (its comment follows FNA, whose members are sequential), so SendDataOptions::Chat | SendDataOptions::Reliable does not compile and a combined value can only be produced by a cast. NetPacketCodec::SendDataOptionsToEnetFlags (NetPacketCodec.cpp) maps Reliable, ReliableInOrder and Chat, and any value outside the switch, to ENET_PACKET_FLAG_RELIABLE: chat packets are always reliable, and there is no separately ordered chat stream. CNA's own audit records the difference as GS-AUDIT-016 (gamer-services-issues.md).
Source locations
modules/net/include/Microsoft/Xna/Framework/Net/SendDataOptions.hpp— plain enum class, values 0 to 4, no bitwise operatorsmodules/net/src/Internal/NetPacketCodec.cpp— SendDataOptionsToEnetFlags: Chat and unknown values become ENET_PACKET_FLAG_RELIABLEaudit/gamer-services/gamer-services-issues.md— GS-AUDIT-016: combined Chat send flags
Evidence
Read at b0e97bb1 and compared with the decompiled XNA 4.0 SendDataOptions; nothing was built or executed. CNA's audit classifies GS-AUDIT-016 as needing further qualification and notes that extra reliability alone does not prove a game-breaking failure; this entry records only the narrower contract.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
The net tests cover each individual option; none combines Chat with another flag.
Regression test
Give SendDataOptions XNA's flag semantics and bitwise operators, map the Chat combinations to their own reliability and ordering, and test each of the eight values between two machines.
Blast radius
Ports that combine Chat with Reliable or InOrder, or rely on chat packets being unreliable or ordered only among themselves: delivery is stronger than requested, so nothing is lost, but ordering and bandwidth differ. Games that use the four plain options are unaffected.
Workaround
Send chat with Reliable or ReliableInOrder explicitly, and do not cast combined values.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- Deep dives
- Network sessions: delivery guarantees
- Known issues
- Functional gap index