source: python/vendor/Python-2.7.6/Demo/sockets/unixclient.py

Last change on this file was 2, checked in by Yuri Dario, 15 years ago

Initial import for vendor code.

  • Property svn:eol-style set to native
File size: 232 bytes
Line 
1# Echo client demo using Unix sockets
2# Piet van Oostrum
3
4from socket import *
5
6FILE = 'unix-socket'
7s = socket(AF_UNIX, SOCK_STREAM)
8s.connect(FILE)
9s.send('Hello, world')
10data = s.recv(1024)
11s.close()
12print 'Received', repr(data)
Note: See TracBrowser for help on using the repository browser.