template, fixes

This commit is contained in:
Pascal Engélibert 2024-02-17 18:05:21 +01:00
commit ac045c3e0e
7 changed files with 238 additions and 37 deletions

14
chat.py Normal file
View file

@ -0,0 +1,14 @@
import network, sys, time
sock = network.Sock()
port = 33077
if sys.argv[1] == "s":
sock.listen(["0.0.0.0", port])
while True:
for d, a in sock.get():
print(a, d)
time.sleep(0.1)
elif sys.argv[1] == "c":
while True:
sock.send(input(), ["192.168.0.255", port])