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

Add support for multiple NICs and specifying which local IP to bind the server to. #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

PhonicUK
Copy link

@PhonicUK PhonicUK commented May 13, 2021

On servers with multiple NICs it may be necessary or desirable to bind a server to a specific one of them instead of listening on all available NICs.

I've added the ability to do this to the KCPTransport. Now you can do:

KcpTransport.LocalIP = IPAddress.Parse("1.2.3.4");

Because of the way it uses an optional parameter and a field that initialises with the same value, this is an API compatible drop-in change.

PhonicUK added 2 commits May 13, 2021 20:59
Allow the server to have a local IP binding specified. Remains API compatible as the new param is optional and reverts to the same original default (v6Any)
Allows (in code) the local IP that the server will bind against to be specified for servers with multiple IPs.
@miwarnec miwarnec force-pushed the master branch 3 times, most recently from 6f47d9c to 6900bf2 Compare July 16, 2021 04:32
@miwarnec miwarnec force-pushed the master branch 2 times, most recently from b31337a to 38b3ac4 Compare November 28, 2021 15:51
@miwarnec miwarnec force-pushed the master branch 2 times, most recently from e65e85b to 6baf722 Compare January 9, 2022 04:14
@miwarnec miwarnec force-pushed the master branch 2 times, most recently from 4e43d57 to a18854b Compare December 14, 2022 15:58
@miwarnec miwarnec force-pushed the master branch 3 times, most recently from d6ae9fe to eeb25ed Compare April 7, 2023 02:40
@miwarnec miwarnec force-pushed the master branch 2 times, most recently from ec826db to 5e2ef37 Compare October 28, 2023 18:42
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