Fixed errors in examples
This commit is contained in:
@ -11,7 +11,7 @@ use React\Promise\Promise;
|
||||
use React\Socket\SocketServer;
|
||||
|
||||
$websockets = new WebSocketMiddleware();
|
||||
$websockets->on('connect', function (WebSocketInterface $websocket) {
|
||||
$websockets->on('connection', function (WebSocketInterface $websocket) {
|
||||
$websocket->on('text', function ($text) use ($websocket) {
|
||||
if (str_starts_with($text, '#')) {
|
||||
$websocket->setGroup(substr($text,1));
|
||||
|
Reference in New Issue
Block a user