I (104793) WEBSOCKET: WEBSOCKET_EVENT_CONNECTED
I (104953) WEBSOCKET: WEBSOCKET_EVENT_DATA
I (104953) WEBSOCKET: Received opcode=1
W (104953) WEBSOCKET: Received=<b>服务端主动向你推送:</b> <span style='font-size:20px;'>点击进入<a style='font-weight:900;font-size:16px;' href='http://www.blue-zero.com/chat/' target='_blank'>【聊天室】[围观]</a>,使用websocket开发,支持一对一私聊和一对多公聊</span>
W (104983) WEBSOCKET: Total payload length=277, data_len=277, current payload offset=0
I (104993) WEBSOCKET: WEBSOCKET_EVENT_DATA
I (104993) WEBSOCKET: Received opcode=1
W (105003) WEBSOCKET: Received=<b style='color:#ff9900;'>作者(在线)</b>:halo~,websocket开发上有什么疑问可以加我微信
W (105013) WEBSOCKET: Total payload length=106, data_len=106, current payload offset=0
I (105603) WEBSOCKET: Sending hello 0009
E (105643) TRANSPORT_WS: Error read data
E (105643) WEBSOCKET_CLIENT: Error read data
E (105643) WEBSOCKET_CLIENT: Error receive data
I (105653) WEBSOCKET_CLIENT: Reconnect after 10000 ms
乐鑫的websocket官方例程,请问大佬们,为什么发送hello 0000之后,提示会红字?例程就改了URI,其他的都没改。。
ESP32进行websocket通信接收数据出错
-
- Posts: 786
- Joined: Wed Nov 14, 2018 8:45 am
Re: ESP32进行websocket通信接收数据出错
IDF 版本?URI?
Re: ESP32进行websocket通信接收数据出错
版本:esp-idf-v4.4,
URI:ws://121.40.165.18:8800
URI:ws://121.40.165.18:8800
Re: ESP32进行websocket通信接收数据出错
错误的原因是你这个服务器主动断开的,我使用 websocket 工具也是这个现象。服务器回复:十分抱歉,由于服务器资源紧张,今日【接收消息】已超过50次(每日重置),现已断开。<br/>请咨询作者【微信:yaohuang46】来获取自定的客户端【不断开】的长连接测试。
Re: ESP32进行websocket通信接收数据出错
你可以抓包看下,你也可以在异常处打印 errno 值确认。
Who is online
Users browsing this forum: No registered users and 70 guests