hyperf / hyperf/socketio-server
服务端从容器中获取 SocketIO 单例, 然后 emit 推送消息给客户端,如果获取客户端收到消息后返回的 ack?
Abierto
- Lenguaje dominante
- PHP
- Estrellas
- 26
- Forks
- 6
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
如题,感谢。
比如业务上的一个控制器, 调用此控制器向特定的 客户端 发送消息
```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
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.