本文整理汇总了Python中cherrypy.wsgiserver.CP_fileobject方法的典型用法代码示例。如果您正苦于以下问题:Python wsgiserver.CP_fileobject方法的具体用法?Python wsgiserver.CP_fileobject怎么用?Python wsgiserver.CP_fileobject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cherrypy.wsgiserver
的用法示例。
在下文中一共展示了wsgiserver.CP_fileobject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: makefile
# 需要导入模块: from cherrypy import wsgiserver [as 别名]
# 或者: from cherrypy.wsgiserver import CP_fileobject [as 别名]
def makefile(self, sock, mode='r', bufsize=DEFAULT_BUFFER_SIZE):
return wsgiserver.CP_fileobject(sock, mode, bufsize)
示例2: makefile
# 需要导入模块: from cherrypy import wsgiserver [as 别名]
# 或者: from cherrypy.wsgiserver import CP_fileobject [as 别名]
def makefile(self, sock, mode='r', bufsize=-1):
if SSL and isinstance(sock, SSL.ConnectionType):
timeout = sock.gettimeout()
f = SSL_fileobject(sock, mode, bufsize)
f.ssl_timeout = timeout
return f
else:
return wsgiserver.CP_fileobject(sock, mode, bufsize)
示例3: makefile
# 需要导入模块: from cherrypy import wsgiserver [as 别名]
# 或者: from cherrypy.wsgiserver import CP_fileobject [as 别名]
def makefile(self, sock, mode='r', bufsize=-1):
return wsgiserver.CP_fileobject(sock, mode, bufsize)