/usr/share/doc/python-gevent-doc/examples/unixsocket_client.py is in python-gevent-doc 1.0-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 | import socket
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect("./unixsocket_server.py.sock")
s.send('GET / HTTP/1.0\r\n\r\n')
data = s.recv(1024)
print 'received %s bytes' % len(data)
print data
s.close()
|