filsh/yii2-wamp
Composer 安装命令:
composer require filsh/yii2-wamp
包简介
Extension for WAMP(Web Application Messaging Protocol)
README 文档
README
Installation
It is recommended that you install the Gearman library through composer. To do so, add the following lines to your composer.json file.
{
"require": {
"filsh/yii2-wamp": "dev-master"
}
}
Examples
// 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(); } ); });
统计信息
- 总下载量: 91
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-06-27