本文整理匯總了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)