laravel-swoole icon indicating copy to clipboard operation
laravel-swoole copied to clipboard

How to send websocket messages on the server

Open junshenshi opened this issue 4 years ago • 3 comments

Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks! (Any non-English issues will be closed immediately.)

  1. Please provide your PHP and Swoole version. (php -v and php --ri swoole)

PHP 7.3.11 (cli) swoole

Swoole => enabled Author => Swoole Team [email protected] Version => 4.4.17 Built => Apr 20 2020 14:49:44 coroutine => enabled epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled

  1. Please provide your Laravel/Lumen version.

laravel7

  1. Which release version of this package are you using? 2.6

  2. What did you do? If possible, provide a recipe for reproducing the error.

Command sends a websocket message

error:Target class [swoole.websocket] does not exist.

  1. What did you expect to see?

Successfully sent websocket message

  1. What did you see instead?

Error:Target class [swoole.websocket] does not exist.

junshenshi avatar Jul 29 '20 07:07 junshenshi

@happiness9721 ,

Do you call the websocket instance in the swoole server and turn on websocket mode?

albertcht avatar Oct 04 '20 08:10 albertcht

I have no idea😂 guess tag wrong pp? @junshenshi

happiness9721 avatar Oct 05 '20 02:10 happiness9721

confirmed Command cant invoke Websocket, using api for a workround 😂

solaz3 avatar Feb 04 '21 08:02 solaz3