Commit 7a0163f0 authored by Marlene Böhmer's avatar Marlene Böhmer

Update Prrt to develop

parent 699bb492
Subproject commit 45325c31c9a61ab006a3aab3a53021b2821caca5
Subproject commit 9871f4505b41fe211e405266c24022188730a6a1
import sys
import prrt
port = int(sys.argv[1])
s = prrt.PrrtSocket(port=port, isSender=False)
while True:
d = s.recv()
if d != "Close":
print d
else:
break
import sys
import prrt
host = sys.argv[1]
port = int(sys.argv[2])
s = prrt.PrrtSocket(port=port, isSender=True)
s.connect(host, port)
for i in range(10):
s.send("Packet {}".format(i))
s.send("Close")
......@@ -3,15 +3,15 @@ include:
sender_py:
file.managed:
- name: /home/rna/sender.py
- source: salt://prrt/files/sender.py
- name: /home/rna/sender_prrt.py
- source: salt://prrt/files/PRRT/examples/sender.py
- user: rna
- group: rna
receiver_py:
file.managed:
- name: /home/rna/receiver.py
- source: salt://prrt/files/receiver.py
- name: /home/rna/receiver_prrt.py
- source: salt://prrt/files/PRRT/examples/receiver.py
- user: rna
- group: rna
......@@ -23,7 +23,7 @@ receiver_py_sh:
- mode: 777
- contents: |-
#!/bin/bash
python receiver.py 5000
python3 receiver_prrt.py 5000
sender_py_sh:
file.managed:
......@@ -33,4 +33,4 @@ sender_py_sh:
- mode: 777
- contents: |-
#!/bin/bash
python sender.py 10.8.0.102 5000
python3 sender_prrt.py 10.8.0.102 5000
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment