今天測試時(shí),使用的是 WebSocket ,后端執(zhí)行了 ipconfig 命名,其中 var_dump 的數(shù)據(jù)是正常的,但是 send 到前臺(tái)就提示 WebSocket connection to failed: Could not decode a text frame as UTF-8.,并導(dǎo)致前臺(tái)鏈接中斷。請(qǐng)問是什么原因?qū)е碌哪兀?/p>
可能傳輸?shù)臄?shù)據(jù)包含二進(jìn)制數(shù)據(jù),設(shè)置$connection->websocketType = Websocket::BINARY_TYPE_ARRAYBUFFER;
試下
http://doc3.workerman.net/appendices/about-websocket.html