仿著這個例子做的:http://doc.workerman.net/components/channel-examples.html [attach]2507[/attach] [attach]2508[/attach] [attach]2509[/attach] 啟動沒問題,但是使用Client::publish 就會報錯...
使用場景: 需要從API接口添加人臉數(shù)據(jù)到設備,通過socket連接。現(xiàn)在使用api接口使用Gateway::sendToUid? 能發(fā)送數(shù)據(jù)到設備,也能添加成功并返回數(shù)據(jù),但返回在服務器里,api這邊不能得到回調數(shù)據(jù)。 api這邊使用Gateway::$persistentConnection設置成短鏈接了,不然就會報錯。 怎么才能在api這里能即時獲取到設備返回的數(shù)據(jù)? ?...