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