From 14087676a06971b2750cb0632afea69343e85ae4 Mon Sep 17 00:00:00 2001 From: JobinLi Date: Wed, 20 May 2020 17:40:53 +0800 Subject: [PATCH] fix error example for broadcast in README.md --- src/socketio-server/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socketio-server/README.md b/src/socketio-server/README.md index b4542b463..02ea028af 100644 --- a/src/socketio-server/README.md +++ b/src/socketio-server/README.md @@ -115,7 +115,7 @@ function onConnect(\Hyperf\SocketIOServer\Socket $socket){ $socket->emit('hello', 'can you hear me?', 1, 2, 'abc'); // sending to all clients except sender - $socket->broadcast->emit('broadcast', 'hello friends!'); + $socket->broadcast(true)->emit('broadcast', 'hello friends!'); // sending to all clients in 'game' room except sender $socket->to('game')->emit('nice game', "let's play a game");