Mono.Nat.NatUtility.Receive C# (CSharp) Méthode

Receive() static private méthode

static private Receive ( IMapper mapper, List clients ) : void
mapper IMapper
clients List
Résultat void
        static void Receive(IMapper mapper, List<UdpClient> clients)
        {
            IPEndPoint received = new IPEndPoint(IPAddress.Parse("192.168.0.1"), 5351);
            foreach (UdpClient client in clients)
            {
                if (client.Available > 0)
                {
                    IPAddress localAddress = ((IPEndPoint)client.Client.LocalEndPoint).Address;
                    byte[] data = client.Receive(ref received);
                    mapper.Handle(localAddress, data);
                }
            }
        }
		

Same methods

NatUtility::Receive ( ISearcher searcher, List clients ) : void