From ce1e85e1e6045013afcffaac3c1b489148dd27ac Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 9 May 2025 11:15:32 +0000 Subject: [PATCH] fix: emit message --- src/WebSocket/Client.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/WebSocket/Client.php b/src/WebSocket/Client.php index 20361ee..9a2e455 100644 --- a/src/WebSocket/Client.php +++ b/src/WebSocket/Client.php @@ -246,6 +246,7 @@ public function receive(): ?string if ($frame instanceof Frame) { switch ($frame->opcode) { case WEBSOCKET_OPCODE_TEXT: + $this->emit('message', $frame->data); return $frame->data; case WEBSOCKET_OPCODE_CLOSE: $this->handleClose();