def __init__(self, fd, port=None):
assert port is None
# invoke parent constructor
http_client.HTTPConnection.__init__(self, "localhost")
# self.sock was initialized by httplib.HTTPConnection
# to point to a socket, overwrite it with a pipe.
assert type(fd) == int and os.fstat(fd)
self.sock = PipeSocket(fd, "client-connection")
评论列表
文章目录