dev-master
9999999-dev https://github.com/filsh/yii2-wampExtension for WAMP(Web Application Messaging Protocol)
MIT
The Requires
by Igor Maliy
module yii
Extension for WAMP(Web Application Messaging Protocol)
It is recommended that you install the Gearman library through composer. To do so, add the following lines to your composer.json
file., (*1)
{ "require": { "filsh/yii2-wamp": "dev-master" } }
// configure component 'components' => [ 'wampRouter' => [ 'class' => 'filsh\wamp\components\WampRouter', 'realm' => 'realm', 'host' => '172.17.0.20', 'port' => '8000', ], 'wamp' => [ 'class' => 'filsh\wamp\Module', 'wampRouter' => 'wampRouter', 'runnerMap' => [ ... ] ] ], // run examples Yii::$app->wampRouter->connect(function(Connection $connection, ClientSession $session) { $session->call('com.myapp.add2', [2, 3]) ->then(function (CallResult $result) use($connection) { echo $result; $connection->close(); }, function (ErrorMessage $error) use($connection) { echo $error; $connection->close(); } ); });
Extension for WAMP(Web Application Messaging Protocol)
MIT
module yii