receiver.py 217 Bytes
Newer Older
1 2 3 4 5
import sys
import prrt

port = int(sys.argv[1])

Andreas Schmidt's avatar
Andreas Schmidt committed
6
s = prrt.PrrtSocket(("0.0.0.0", port))
7 8

while True:
9 10
    d, addr = s.recv()
    d = d.decode("utf8")
11
    if d != "Close":
12
        print(d, addr)
13 14
    else:
        break