예제 #1
0
 public void Start()
 {
     Task.Run(async() =>
     {
         await _uPnPPortForwarder.ForwardPortIfNatFound();
         Task.Run(() => _networkListenerLoop.ExecuteTcpListenerLoop());
         Task.Run(() => _networkListenerLoop.ExecuteUdpListenerLoop());
     });
 }
예제 #2
0
        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());
        }