public void Start() { Task.Run(async() => { await _uPnPPortForwarder.ForwardPortIfNatFound(); Task.Run(() => _networkListenerLoop.ExecuteTcpListenerLoop()); Task.Run(() => _networkListenerLoop.ExecuteUdpListenerLoop()); }); }
public void Start() { if (_clientSettings.NodeType != "SeedNode") { Task.Delay(2000).Wait(); Task.Run(() => ConnectToPeer(_seedNodeEndPoint)); } Task.Run(async() => { await _uPnPPortForwarder.ForwardPortIfNatFound(); _networkListenerLoop.StartListeningForConnections(); }); Task.Run(() => RequestMorePeersLoop()); }