[Enhancement]: Protocols need to send additional packets after the RMC response #85
Open
1 task done
Labels
awaiting-approval
Topic has not been approved or denied
enhancement
An update to an existing part of the codebase
Checked Existing
What enhancement would you like to see?
Various protocols generate additional traffic outside the basic RMC request-response model, but nex-protocols-go does not provide enough control over ordering to implement this fully.
For example, take matchmaking and its participation notifications:

(Capture from Minecraft: Wii U Edition on Nintendo Network)
Note how the RMC Success response is delivered first, then the notification events relevant to the joined match. The PRUDP sequence numbers also reflect this ordering.
Under the current design of nex-protocols-go, this isn't possible to emulate, since the protocol implementation only gets to return a single RMC response, and
globals.Respond
will only ever emit a single PRUDP packet.nex-protocols-go/matchmake-extension/join_matchmake_session_with_param.go
Lines 40 to 46 in a9e527b
Currently this is worked around by emitting the notifications inside the protocol implementation itself, but this results in the wrong ordering.
Any other details to share? (OPTIONAL)
Some ideas for improving this:
emit("data")
stuff in nex-go, to either PacketInterface or a new "call context" struct containing PacketInterface, then add anOnAfterResponse
event. The protocol implementation could then register a lambda function to finish up any additional work it wants to do after the RMC response is sent (like notification delivery). This feels like a neat solution since all notification delivery can be handled together after matchmaking is "done".The text was updated successfully, but these errors were encountered: