summaryrefslogtreecommitdiff
path: root/tomorrowtheground.py
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2012-05-01 12:16:00 +0100
committerTim Redfern <tim@eclectronics.org>2012-05-01 12:16:00 +0100
commitbe1dd58124b3b4e1ad7a9eeabfb421d246b6ad1b (patch)
treebbb8eaec0f9b2e62bbc01767ab24f20f998bce67 /tomorrowtheground.py
initial commit
Diffstat (limited to 'tomorrowtheground.py')
-rwxr-xr-xtomorrowtheground.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tomorrowtheground.py b/tomorrowtheground.py
new file mode 100755
index 0000000..7b68b12
--- /dev/null
+++ b/tomorrowtheground.py
@@ -0,0 +1,11 @@
+#!/usr/bin/python
+#UDP listener
+
+import socket
+UDP_IP="127.0.0.1"
+UDP_PORT=5204
+sock = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
+sock.bind( (UDP_IP,UDP_PORT) )
+while True:
+ data, addr = sock.recvfrom( 1024 )
+ print "received message:", data \ No newline at end of file