本文整理汇总了Python中eventlet.green.httplib.HTTPSConnection.close方法的典型用法代码示例。如果您正苦于以下问题:Python HTTPSConnection.close方法的具体用法?Python HTTPSConnection.close怎么用?Python HTTPSConnection.close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eventlet.green.httplib.HTTPSConnection
的用法示例。
在下文中一共展示了HTTPSConnection.close方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: close
# 需要导入模块: from eventlet.green.httplib import HTTPSConnection [as 别名]
# 或者: from eventlet.green.httplib.HTTPSConnection import close [as 别名]
def close(self):
if self.sock:
# Removing reference to socket but don't close it yet.
# Response close will close both socket and associated
# file. Closing socket too soon will cause response
# reads to fail with socket IO error 'Bad file descriptor'.
self.sock = None
# Calling close on HTTPConnection to continue doing that cleanup.
HTTPSConnection.close(self)
示例2: close
# 需要导入模块: from eventlet.green.httplib import HTTPSConnection [as 别名]
# 或者: from eventlet.green.httplib.HTTPSConnection import close [as 别名]
def close(self):
if self.sock:
self.sock = None
HTTPSConnection.close(self)