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

Allow NetcodeServer to manage connections from multiple sockets #150

Closed
wants to merge 11 commits into from

Conversation

UkoeHB
Copy link
Contributor

@UkoeHB UkoeHB commented Feb 23, 2024

Builds off #149 to allow NetcodeServerTransport to internally manage multiple TransportSockets. This is done by 'domain-separating' the client address space between each socket with a 'socket id'. It is important that sockets don't have overlapping address spaces so the netcode protocol can properly enforce connection invariants.

With this PR, you can have a UdpSocket and WebTransport socket providing packets to the same NetcodeServer, which makes it safe for clients to switch sockets mid-game! If you don't share NetcodeServer then it is not safe to allow socket switching (without some hairy and hard-to-validate engineering) because it is not possible/easy to enforce that a client only has one connection to the server.

At this point I don't have high hopes for these PRs to be merged, but I am presenting them nevertheless.

@UkoeHB UkoeHB force-pushed the agnostic3 branch 2 times, most recently from 636be39 to e0f0862 Compare February 23, 2024 02:35
@UkoeHB
Copy link
Contributor Author

UkoeHB commented Apr 20, 2024

Closing this as implemented in renet2.

@UkoeHB UkoeHB closed this Apr 20, 2024
@UkoeHB UkoeHB deleted the agnostic3 branch April 20, 2024 00:35
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.

1 participant