hyperf / hyperf/socketio-server
服务端从容器中获取 SocketIO 单例, 然后 emit 推送消息给客户端,如果获取客户端收到消息后返回的 ack?
- 主要言語
- PHP
- スター
- 26
- フォーク
- 6
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
如题,感谢。
比如业务上的一个控制器, 调用此控制器向特定的 客户端 发送消息
```php
class SendMessageController{
public function index(){
$socket = ApplicationContext::getContainer()->get(SocketIO::class);
$reply = $socket->to($client_id)->emit('some_event', '消息体')->reply(); // $reply is null ?
}
}
```
以上返回的 reply 为 null
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start with SendMessageController::index and the SocketIO instance obtained through ApplicationContext::getContainer(); trace the to($client_id)->emit('some_event', '消息体')->reply() chain and how client acknowledgements are handled. Done means establishing whether this server-side call can receive the client's ack and defining the expected non-null reply behavior.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php
- 領域
- api, backend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100