BrandonPotter / SimpleTCP

Straightforward .NET library to handle the repetitive tasks of spinning up and working with TCP sockets (client and server).
Apache License 2.0
365 stars 108 forks source link

alternative prioritization rules in RankIpAddress #15

Closed brudo closed 6 years ago

brudo commented 7 years ago

Trying a different ranking algorithm, to give a large boost to addresses that are associated with the same NIC as the default router, and eliminate some other special-case tests for 172.30., 192.168.1., etc. Related to SimpleTCP issue #14 as tracked on GItHub.

brudo commented 7 years ago

Inviting comment, any changes / refinements needed? Treat as a starting point if you wish, and change as you see fit. Meanwhile I am not using SimpleTCP in our present implementation, but it does look like a good piece of code and I'm glad to contribute to it whether or not you merge this.

BrandonPotter commented 7 years ago

Hey! Sorry, fully intend to merge this - just need to run it on a couple of our in-use apps to make sure it doesn't break the obvious use cases, will try to do that in the next couple days.

brudo commented 6 years ago

I noticed I had neglected to include a fix for @BrandonPotter's final remark on the related issue #14, with a potential uncaught exception. I added that to my branch now, but I'm not sure if it will show up here, and I already merged the PR so... I can open a second PR and attach to the same issue, I guess?