private TcpListenerManager(bool useUpnp, IUpnpClientFactory upnpClientFactory) { _useUpnp = useUpnp; _upnpClientFactory = upnpClientFactory; }
public static async ValueTask <TcpListenerManager> CreateAsync(OmniAddress listenAddress, bool useUpnp, IUpnpClientFactory upnpClientFactory, CancellationToken cancellationToken = default) { var tcpListenerManager = new TcpListenerManager(useUpnp, upnpClientFactory); await tcpListenerManager.InitAsync(listenAddress, cancellationToken); return(tcpListenerManager); }