From: Raphaƫl Couturier Date: Fri, 16 Jul 2021 16:39:19 +0000 (+0200) Subject: new X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/commitdiff_plain/248cb37c4fc6ec91a0dc94ee5a94d2df675bfce9?ds=sidebyside new --- diff --git a/measure_energy_iot/client_tcp4.py b/measure_energy_iot/client_tcp4.py index 542a7ae..885451f 100644 --- a/measure_energy_iot/client_tcp4.py +++ b/measure_energy_iot/client_tcp4.py @@ -15,7 +15,7 @@ PORT = 2345 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) -nb_times=100 +nb_times=10 quality=int(sys.argv[1]) print("quality ",quality) diff --git a/measure_energy_iot/receiver.py b/measure_energy_iot/receiver.py index 0841a15..cb3617d 100644 --- a/measure_energy_iot/receiver.py +++ b/measure_energy_iot/receiver.py @@ -26,7 +26,7 @@ data,addr = s.recvfrom(buf) try: while(data): f.write(data) - s.settimeout(0.001) + s.settimeout(1) data,addr = s.recvfrom(buf) except timeout: s.close()