You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. 😄
The text was updated successfully, but these errors were encountered:
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. 😄
The text was updated successfully, but these errors were encountered: