From 248cb37c4fc6ec91a0dc94ee5a94d2df675bfce9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Couturier?= Date: Fri, 16 Jul 2021 18:39:19 +0200 Subject: [PATCH 1/1] new --- measure_energy_iot/client_tcp4.py | 2 +- measure_energy_iot/receiver.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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() -- 2.39.5