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

[Feature Request] Expose ISearcher and the searcher types or something similar publicly for DI (among other things) #36

Open
nike4613 opened this issue Jan 27, 2021 · 0 comments

Comments

@nike4613
Copy link

I am currently working on an application which uses uPNP to open ports for P2P communication. I am using DI quite heavily, and would like to be able to inject the uPNP searcher through that, rather than going through the global. Because I need to perform operations based primarily on the capabilities of the network adapter, I am currently manually polling with NatUtility.Search(gatewayIp), using the gateway I've identified for the interface I'm targeting.

In addition, having a public API that does not have global state makes it much easier to test around, as well as being easier to write code with thread-safety.

Of course, I could also just be missing something that is already present that does exactly this. 😄

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

No branches or pull requests

1 participant