diff options
Diffstat (limited to 'Demo/sockets/unixclient.py')
| -rw-r--r-- | Demo/sockets/unixclient.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Demo/sockets/unixclient.py b/Demo/sockets/unixclient.py new file mode 100644 index 0000000000..a0d80f6083 --- /dev/null +++ b/Demo/sockets/unixclient.py @@ -0,0 +1,10 @@ +# Echo client demo using Unix sockets +# Piet van Oostrum +from socket import * +FILE = 'blabla' +s = socket(AF_UNIX, SOCK_STREAM) +s.connect(FILE) +s.send('Hello, world') +data = s.recv(1024) +s.close() +print 'Received', `data` |
