quangthinh / yii2-sio
1.0
2017-05-25 14:44 UTC
Requires
- npm-asset/socket.io-client: *
- yiisoft/yii2: ^2.0
- yiisoft/yii2-redis: ~2.0.0
This package is not auto-updated.
Last update: 2026-03-15 10:12:23 UTC
README
socket.io emitter
Install
composer require quangthinh/yii2-sio
Add to Component section at config file
'sio' => [
'class' => 'quangthinh\yii\sio\Connection',
'redis' => [
'class' => 'yii\redis\Connection',
'hostname' => 'localhost',
'port' => 6379,
'database' => 0,
],
],
Usage
port of socket.io-emitter
Yii::$app->sio
->to("ROOM_ID")
->emit("EVENT", "MSG", ...)