我尝试通过lws_write发送数据,但发现缓冲区返回时已更改。
INFO("Now write head data %d",n);
lwsl_hexdump_notice(pstPosTmp->data, pstPosTmp->len);
n = lws_write(wsi,pstPosTmp->data + LWS_SEND_BUFFER_PRE_PADDING,pstPosTmp->len,LWS_WRITE_TEXT);
INFO("Now write payload data %d %p %s ",n,pstPosTmp->data,(char *)(pstPosTmp->data + LWS_SEND_BUFFER_PRE_PADDING));
lwsl_hexdump_notice(pstPosTmp->data, pstPosTmp->len);
两次lwsl_hexdump_notice将显示不同的内容。