For ios,I use SocketRocket to send request,but its data type is nsdata not bytes,get some errors :
Error in connection handler
Traceback (most recent call last):
File "/home/zyb/miniconda3/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 750, in transfer_data
message = await self.read_message()
File "/home/zyb/miniconda3/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 819, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
File "/home/zyb/miniconda3/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 895, in read_data_frame
frame = await self.read_frame(max_size)
File "/home/zyb/miniconda3/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 971, in read_frame
frame = await Frame.read(
File "/home/zyb/miniconda3/lib/python3.8/site-packages/websockets/legacy/framing.py", line 96, in read
frame.check()
File "/home/zyb/miniconda3/lib/python3.8/site-packages/websockets/frames.py", line 244, in check
raise ProtocolError("control frame too long")
websockets.exceptions.ProtocolError: control frame too long
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/zyb/miniconda3/lib/python3.8/site-packages/websockets/legacy/server.py", line 293, in handler
await self.ws_handler(self, path)
File "asr_server4.py", line 64, in recognize
message = await websocket.recv()
File "/home/zyb/miniconda3/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 421, in recv
await self.ensure_open()
File "/home/zyb/miniconda3/lib/python3.8/site-packages/websockets/legacy/protocol.py", line 735, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
For ios,I use SocketRocket to send request,but its data type is nsdata not bytes,get some errors :