tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

commit 19423b2fa7b2c986ecee22d7ed8f8d7226d46de6
parent 7019f0bbdb032523c0dc1d643bdc0289e9121f3d
Author: rbckman <rob@tarina.org>
Date:   Tue, 10 Jan 2023 15:06:55 +0000

ye naa

Diffstat:
Mtarina.py | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tarina.py b/tarina.py @@ -1181,7 +1181,7 @@ def sendtoserver(host, port, data): def listenforclients(host, port, q): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + #s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind((host,port)) #s.settimeout(0) try: @@ -1189,7 +1189,7 @@ def listenforclients(host, port, q): s.listen(5) c, addr = s.accept() while True: - data = c.recv(1024) + data = c.recv(1024).decode() if not data: print("no data") break @@ -1197,7 +1197,7 @@ def listenforclients(host, port, q): if addr: print(addr[0],' sending back') sendtoserver(addr[0],port,str(time.time())) - nextstatus = data.decode() + nextstatus = data print("got data:"+nextstatus) c.close() q.put(nextstatus)