def connect(self):
# Hijack the connect method of HTTPConnection to connect to the
# specified Unix domain socket instead. Obey the same contract
# as HTTPConnection.connect, which puts the socket in self.sock.
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
sock.connect(self.path)
self.sock = sock
评论列表
文章目录