Ciao a tutti...mettendo a punto un test UDP (devo calcolare la percentuale di pacchetti ricevuti) ho notato la spedendo 100 pacchetti o un numero maggiore...tipo 10000 i pacchetti ricevuti sono sempre inferiori al 50% da cosa può dipendere secondo voi...
LATO RICEZIONE
codice:ds = new DatagramSocket(5000); ds.setSoTimeout(10000); while(h<100) { DatagramPacket dp = new DatagramPacket(buffer, buffer.length); ds.receive(dp); h++; }
LATO SPEDIZIONE
codice:ds = new DatagramSocket(2550); while(h<100) { DatagramPacket dp = new DatagramPacket(buffer,buffer.length,InetAddre,5000); ds.send(dp); h++; } ds.close(); }

Rispondi quotando