Skip to content
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

Expose GetClientUserData on YojimboServer class. Fix address serialization bug in matcher code. #201

Merged
merged 6 commits into from
Jul 3, 2024

Conversation

kbirk
Copy link
Contributor

@kbirk kbirk commented Jul 2, 2024

Hey there. I noticed there was no method exposed for that in yojimbo to access the userdata inside the connection token, so I added one.

I also noticed that my userdata bytes were "shifted" and including the trailing 12 bytes of the ServerToClientKey . After some debugging I realized that the writeAddresses function in the matcher code always increments the offset by 19, whether it is IPV4 or IPV6, but netcode it reads only as many bytes as needed. So I fixed that too.

Cheers

@gafferongames
Copy link
Contributor

Thanks! Can you please look into why macOS is not building?

@gafferongames
Copy link
Contributor

I can take a look at it as well. It's curious, and doesn't seem to be triggered by your change?

@kbirk
Copy link
Contributor Author

kbirk commented Jul 3, 2024

Yeah my change really shouldn't affect the CI. I'm wondering if it is because macos-latest uses apple silicon now: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners

Looks like that was it , I added libdirs { "/opt/homebrew/lib" } to the premake file and that seems to have fixed it.

@gafferongames
Copy link
Contributor

Bingo. Nice one

@gafferongames gafferongames merged commit c6c02df into mas-bandwidth:main Jul 3, 2024
6 checks passed
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.

2 participants