本文整理汇总了Python中_pyio.DEFAULT_BUFFER_SIZE属性的典型用法代码示例。如果您正苦于以下问题:Python _pyio.DEFAULT_BUFFER_SIZE属性的具体用法?Python _pyio.DEFAULT_BUFFER_SIZE怎么用?Python _pyio.DEFAULT_BUFFER_SIZE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类_pyio
的用法示例。
在下文中一共展示了_pyio.DEFAULT_BUFFER_SIZE属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: makefile
# 需要导入模块: import _pyio [as 别名]
# 或者: from _pyio import DEFAULT_BUFFER_SIZE [as 别名]
def makefile(self, sock, mode='r', bufsize=DEFAULT_BUFFER_SIZE):
return wsgiserver.CP_makefile(sock, mode, bufsize)
示例2: CP_makefile
# 需要导入模块: import _pyio [as 别名]
# 或者: from _pyio import DEFAULT_BUFFER_SIZE [as 别名]
def CP_makefile(sock, mode='r', bufsize=DEFAULT_BUFFER_SIZE):
if 'r' in mode:
return io.BufferedReader(socket.SocketIO(sock, mode), bufsize)
else:
return CP_BufferedWriter(socket.SocketIO(sock, mode), bufsize)
示例3: makefile
# 需要导入模块: import _pyio [as 别名]
# 或者: from _pyio import DEFAULT_BUFFER_SIZE [as 别名]
def makefile(self, sock, mode='r', bufsize=DEFAULT_BUFFER_SIZE):
raise NotImplemented
示例4: makefile
# 需要导入模块: import _pyio [as 别名]
# 或者: from _pyio import DEFAULT_BUFFER_SIZE [as 别名]
def makefile(self, sock, mode='r', bufsize=DEFAULT_BUFFER_SIZE):
"""Return socket file object."""
cls = StreamReader if 'r' in mode else StreamWriter
return cls(sock, mode, bufsize)
示例5: __init__
# 需要导入模块: import _pyio [as 别名]
# 或者: from _pyio import DEFAULT_BUFFER_SIZE [as 别名]
def __init__(self, sock, mode='r', bufsize=io.DEFAULT_BUFFER_SIZE):
"""Initialize socket stream reader."""
super().__init__(socket.SocketIO(sock, mode), bufsize)
self.bytes_read = 0
示例6: MakeFile
# 需要导入模块: import _pyio [as 别名]
# 或者: from _pyio import DEFAULT_BUFFER_SIZE [as 别名]
def MakeFile(sock, mode='r', bufsize=io.DEFAULT_BUFFER_SIZE):
"""File object attached to a socket object."""
cls = StreamReader if 'r' in mode else StreamWriter
return cls(sock, mode, bufsize)
示例7: makefile
# 需要导入模块: import _pyio [as 别名]
# 或者: from _pyio import DEFAULT_BUFFER_SIZE [as 别名]
def makefile(self, sock, mode='r', bufsize=DEFAULT_BUFFER_SIZE):
return wsgiserver.CP_makefile(sock, mode, bufsize)
示例8: CP_makefile_PY3
# 需要导入模块: import _pyio [as 别名]
# 或者: from _pyio import DEFAULT_BUFFER_SIZE [as 别名]
def CP_makefile_PY3(sock, mode='r', bufsize=DEFAULT_BUFFER_SIZE):
if 'r' in mode:
return io.BufferedReader(socket.SocketIO(sock, mode), bufsize)
else:
return CP_BufferedWriter(socket.SocketIO(sock, mode), bufsize)