定制 filsh/yii2-wamp 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 3
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-27