-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lots of changes on common protocols #12
Conversation
Since we now store the client station URLs on nex.Client, there's no need for external handlers to do so, so remove them. Also, the handlers were deprecated as they didn't do anything anyway.
Also remove external handlers, as we now store the client station URLs on nex.Client. And implement ReportNATTraversalResult.
- Use structure.Copy() and structure.Equal() now that they are implemented. - Add notification types that weren't used before. - Remove handlers for MatchMaking(-Ext) and use global sessions for handling rooms. - And possibly more
And other improvements
While I was testing this on MK7, everything seemed to work fine, except that one of the clients would randomly disconnect in-game from the session (also causing the other client to leave) and from NEX for seemingly no reason (there aren't any requests sent to NEX before this happening, just the Luckily, the NEX matchmaking sessions themselves seem to work fine. I can't test nat traversal however, since both machines are connected to the same network |
About how long does this take to happen? It sounds like a ping timeout issue |
It would happen some seconds after the game had started (the time varied on each test). I will try again tomorrow |
Interestingly, the issue above appears on Race mode, but on Battle mode almost everything works just fine, and I can play as many rounds as I want. However, when one of the participants leaves, the I wonder if this is a me issue, because of having the server and consoles on the same network? idk |
It's possible that's causing issues, yeah. I've had a few issues when hosting the servers on the same network as the clients in the past. That is weird though |
I see this was marked as open, no longer a draft. Are we still waiting for more changes or is this ready for review now? |
Yes, it's ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some things addressed here are not actually changes you made, but they are around the code you are working on and this PR seems to be broadly covering a refactor of the common protocols, so I figured they fit
Also full transparency, since I am personally not very familiar with the matchmaking system specifically, my review is strictly on code quality and performance. I have not exactly reviewed the logic behind the matchmaking itself, and I would prefer if I could get another set of eyes on that. I have already assigned @shutterbug2000 for this task as well, but will likely also call upon Rambo since he's done great work on MK8
You will also need to update the go modules, as I have pushed updates to them and made some breaking changes to some protocols
|
||
currentTime := nex.NewDateTime(0) | ||
common_globals.Sessions[sessionIndex].GameMatchmakeSession.StartedTime = nex.NewDateTime(currentTime.UTC()) | ||
|
||
common_globals.CurrentGatheringID++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This value doesn't appear to be checked anywhere. Though very unlikely, if a server runs for long enough and people keep creating sessions then this will reach the max uint32. Reaching this value may create unexpected side effects (such as the above check thinking no session was found, which I addressed in an earlier comment as well). This should be bounds checked
Looks good to me |
Relating to a comment we talked about the other day, |
Carrying over from Discord, @shutterbug2000 has confirmed that the matchmaking changes here work fine in MK7 during his testing. So this PR should be good to merge once the Go modules are updated (I merged your other PR PretendoNetwork/nex-protocols-go#25 and made a new release) and once the other issues are looked at |
Also implement Kerberos ticket time check.
I changed invalid values to be zero, as it can't be a valid gathering ID nor a valid connection ID. To get a gathering ID, I changed the counter to the function I also implemented time validation on Kerberos tickets. If the ticket is expired, we kick the client for timeout, as on Mario Kart 7 the client was still sending data packets when using a graceful kick (using graceful kicks aren't really an issue though, as we delete the client and the server can't decrypt those data packets anymore |
We have to increase the ticket time and compare to the server time. Whoops.
need for external handlers to do so, so remove them. Also, the handlers
were deprecated as they didn't do anything anyway.
as we now store the client station URLs on nex.Client. And implement
ReportNATTraversalResult.
implemented.
handling rooms.
Depends on PretendoNetwork/nex-protocols-go#24