template, fixes
This commit is contained in:
parent
a8009f744d
commit
ac045c3e0e
7 changed files with 238 additions and 37 deletions
14
chat.py
Normal file
14
chat.py
Normal 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])
|
||||
Loading…
Add table
Add a link
Reference in a new issue