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

Swap bytes for port number (case 1006506) #866

Merged
merged 1 commit into from
Mar 15, 2018

Conversation

joncham
Copy link
Member

@joncham joncham commented Mar 9, 2018

Swap bytes for port number as Win32 API returns in network order. Right now on Windows IPGlobalProperties.GetIPGlobalProperties.GetActiveUdpListeners() returns IPEndPoint's all with incorrect ports.

@TautvydasZilys I think this API (ntohs) is fine on UWP and on the minimum Windows versions we support?

@TautvydasZilys
Copy link

Yes, this should be fine.

@TautvydasZilys
Copy link

TautvydasZilys commented Mar 9, 2018

Actually... I didn't look at the exact change. This will cause a DllNotFoundException, unless explictly added to LibraryLoader on libil2cpp side. Remember, you can't system load libraries dynamically on UWP!

@joncham
Copy link
Member Author

joncham commented Mar 10, 2018

I could also just adjust this to do the endian swap myself, but I prefer to just follow official recommendation in case something changes.

@joncham joncham merged commit 5354438 into unity-master Mar 15, 2018
@joncham joncham deleted the unity-master-fix-get-active-udp-listeners branch March 15, 2018 18:03
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.

3 participants