summaryrefslogtreecommitdiffstats
path: root/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unixclient.py
diff options
context:
space:
mode:
Diffstat (limited to 'AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unixclient.py')
-rw-r--r--AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unixclient.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unixclient.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unixclient.py
new file mode 100644
index 0000000000..369e225f4e
--- /dev/null
+++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unixclient.py
@@ -0,0 +1,12 @@
+# Echo client demo using Unix sockets
+# Piet van Oostrum
+
+from socket import *
+
+FILE = 'unix-socket'
+s = socket(AF_UNIX, SOCK_STREAM)
+s.connect(FILE)
+s.send('Hello, world')
+data = s.recv(1024)
+s.close()
+print 'Received', repr(data)