1from __future__ import print_function
2# gevent-test-requires-resource: unixsocket_server
3import socket
4
5s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
6s.connect("./unixsocket_server.py.sock")
7s.send('GET / HTTP/1.0\r\n\r\n')
8data = s.recv(1024)
9print('received %s bytes' % len(data))
10print(data)
11s.close()
Next page: Example unixsocket_server.py