From 167ef97546190778321dc65d1484115cbd916f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Sun, 27 Mar 2022 13:04:57 +0200 Subject: [PATCH] Added socket threading --- main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 8801ad6..caabe8d 100644 --- a/main.py +++ b/main.py @@ -98,7 +98,7 @@ def power_toggle(channel): def socket_listener(): with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.bind((SOCKET_BIND_IP, SOCKET_BIND_PORT)) - s.listen(1) + s.listen() global conn global addr conn, addr = s.accept() @@ -116,9 +116,9 @@ if __name__ == '__main__': try: while True: - # socket_data = conn.recv(1024) - # print(socket_data) - # print(type(socket_data)) + socket_data = conn.recv(1024) + print(socket_data) + print(type(socket_data)) if led_power == True: if check_internet() == False: blink(strip, Color(255,0,0), Color(255,255,255))