-
Notifications
You must be signed in to change notification settings - Fork 44
Refactor WebSocket class to use member variables for message handling… #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… and improve data processing logic.
|
Try to fix PR #34 |
|
(base) m4:mm-esp32-voice hushi.hs$ xtensa-esp32-elf-addr2line -pfiaC -e build/mm-audio.elf 0x403882c9 |
|
还是会 奔溃 |
|
给另外一个线索,我上次的 PR 好像这么修复不会奔溃 |
|
你贴上来的只有堆栈,没有错误信息,我猜测应该是内存不足。可以打印一下每次接收到数据的内容以及实时的可用内存大小。 |
|
[14:50:06.578] I (206267) SystemInfo: free sram: 31603 minimal sram: 30219 |
|
提供一份 系统 信息 |
这里有什么有价值的信息吗? |
|
这里显示还有 30k 的 sram,你猜测的内存不足,应该不是这个问题引起的 |
|
而且结合我说的,如果按照我的 copy 内存的做法,没有奔溃现象来看 |
目前应该是不支持多个任务操作一个网络连接对象的。 |
This pull request updates the WebSocket implementation with several improvements and bug fixes, primarily focusing on better handling of message fragmentation, thread safety, and minor protocol correctness. It also updates the component metadata.
WebSocket implementation improvements:
current_message,is_fragmented, andis_binaryfrom static variables insideOnTcpDatato member variables of theWebSocketclass, improving thread safety and correctness for handling concurrent connections. (include/web_socket.h,src/web_socket.cc) [1] [2] [3]uint64_t, ensuring correct handling of large WebSocket frames. (src/web_socket.cc)payload_length > 0, preventing potential issues with zero-length frames. (src/web_socket.cc)src/web_socket.cc)Component metadata updates:
idf_component.yml.… and improve data processing logic.