【发布时间】:2016-12-16 17:30:56
【问题描述】:
我正在使用 python asyncio 创建一个 websocket 客户端,但是,当我尝试以下代码时,它挂断了
message = b''
while True:
print(11111)
chunk = await reader.read(1024)
print(len(chunk))
self.message += chunk
print(self.connection['reader'].at_eof())
if not chunk:
break
print('eeeeeeee')
但是挂断了输出:
11111
35
错误
如何检查缓冲区是否结束?
【问题讨论】:
标签: python websocket python-asyncio