sender.py 256 Bytes
Newer Older
1
2
3
4
5
import sys
import prrt

host = sys.argv[1]
port = int(sys.argv[2])
6
localport = int(sys.argv[3])
7

8
s = prrt.PrrtSocket(port=localport)
9
10
11
s.connect(host, port)

for i in range(10):
12
13
    s.send("Packet {}".format(i).encode("utf8"))
s.send("Close".encode("utf8"))