-
Notifications
You must be signed in to change notification settings - Fork 3
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
chore: update to nex-go v2 #4
base: master
Are you sure you want to change the base?
Conversation
@@ -27,7 +27,7 @@ func connectMongo() { | |||
mongoContext, _ = context.WithTimeout(context.Background(), 10*time.Second) | |||
_ = mongoClient.Connect(mongoContext) | |||
|
|||
accountDatabase = mongoClient.Database("pretendo") | |||
accountDatabase = mongoClient.Database("pretendo_account") |
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 is what the self-hosted pretendo server was using for its DB name, so I just set it to this. I'm assuming that's what it actually is called. Do we need an environment variable for this?
@@ -8,7 +8,7 @@ import ( | |||
"go.mongodb.org/mongo-driver/mongo/options" | |||
) | |||
|
|||
func GetCallInfoByTarget(target uint32) (uint32, uint32, bool) { // caller pid, target pid, ringing | |||
func GetCallInfoByTarget(target uint64) (uint64, uint64, bool) { // caller pid, target pid, ringing |
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.
I moved to this because PIDs use uint64
} | ||
|
||
// The user must be kicked, otherwise the app hangs forever. | ||
globals.NEXServer.TimeoutKick(client) | ||
// globals.NEXServer.TimeoutKick(client) |
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 is the only area of concern about this PR. How to handle the timeout kick.
fmt.Println("======================") | ||
}) | ||
|
||
// * Register the common handlers first so that they can be overridden if needed | ||
registerCommonProtocols() | ||
registerNEXProtocols() | ||
|
||
globals.NEXServer.Listen(":60005") | ||
globals.SecureServer.Listen(60005) |
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.
I would env variable this but I'd rather wait until we merge the authentication repo in here since it also uses the port
Resolves #3
Changes:
Update to nex-go v2.0
Now uses the nex-protocols-common-go implementations of the Match Making, Match Making Ext and Match Make Extension protocol (along with the servers own handler methods)
Requires the new environment variable
PN_WIIU_CHAT_KERBEROS_PASSWORD
Uses GRPC for account authentication. This comes with its respective environment variables
I have read and agreed to the Code of Conduct.
I have read and complied with the contributing guidelines.
What I'm implementing was an approved issue.
I have tested all of my changes.
Testing this locally will require some rigging to wiiu-chat-authentication (switching it to the ticket-granting protocol) for it to work. I don't have more than one Wii U, but I was able to get into the main Wii U Chat menu.