summaryrefslogtreecommitdiff
path: root/vpn/UDPtester.py
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2012-11-28 18:40:32 +0000
committerComment <tim@gray.(none)>2012-11-28 18:40:32 +0000
commita0ab2cd35d91ba0080f9fb870d82aa90a51a0d6c (patch)
tree0e0fd44d0f07ccf1ea4a5f1e30a03e0203300321 /vpn/UDPtester.py
parent75c277c10f206f5bf3799caa03a52f40c1c8b6cf (diff)
nearly finished except latency
Diffstat (limited to 'vpn/UDPtester.py')
-rwxr-xr-xvpn/UDPtester.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/vpn/UDPtester.py b/vpn/UDPtester.py
new file mode 100755
index 0000000..99b5412
--- /dev/null
+++ b/vpn/UDPtester.py
@@ -0,0 +1,16 @@
+#!/usr/bin/python
+
+import socket
+import sys, tty, termios
+
+UDP_IP = "10.10.10.2"
+UDP_PORT = 5000
+
+sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # UDP
+
+fd = sys.stdin.fileno()
+tty.setraw(sys.stdin.fileno())
+
+while True:
+ s = sys.stdin.read(1)
+ sock.sendto(s, (UDP_IP, UDP_PORT))