Please answer these questions before submitting your issue. Thanks!
php -v and php --ri swoole)最新
Please provide your Laravel/Lumen version.
最新
Which release version of this package are you using?
最新
What did you do? If possible, provide a recipe for reproducing the error.
请问下这个类 SwooleTW\Http\Websocket\SocketIO\WebsocketHandler::class的onopen方法里的例子 对应的前端的例子是怎么样?
那些Packet协议的参数大概有什么用 求助
What did you expect to see?
What did you see instead?
Hi @junshenshi ,
The code in onOpen method of SwooleTW\Http\Websocket\SocketIO\WebsocketHandler::class is mainly to establish a socket.io connection. However, the socket.io protocol is not clearly documented in the official docs. But you can still refer to https://github.com/yasushi-saito/socket.io-spec and https://github.com/socketio/socket.io-protocol
How to run a websocket in Laravel swoole??
this is my route file
27.0.0.1:1215/socket.io
this is the issue
ReflectionException in Route.php line 280: Class App\Http\Controllers\SwooleTW\Http\Controllers\SocketIOController does not exist
These are my details
PHP Version | 7.2.9-1+ubuntu16.04.1+deb.sury.org+1 |
| Swoole Version | 4.2.1 |
| Laravel Version | 5.2.45 |
| Listen IP | 127.0.0.1 |
| Listen Port | 1215 |
| Server Status | Online |
| Reactor Num | 2 |
| Worker Num | 2 |
| Task Worker Num | 0 |
| Websocket Mode | Off |
| PID | 14308 |
| Log Path | /var/www/html/laravel_5.2_swoole/storage/logs/swoole_http.log |
Most helpful comment
Hi @junshenshi ,
The code in
onOpenmethod ofSwooleTW\Http\Websocket\SocketIO\WebsocketHandler::classis mainly to establish asocket.ioconnection. However, thesocket.ioprotocol is not clearly documented in the official docs. But you can still refer to https://github.com/yasushi-saito/socket.io-spec and https://github.com/socketio/socket.io-protocol