2017 © Pedro Peláez
 

yii2-extension yii2-wamp

Extension for WAMP(Web Application Messaging Protocol)

image

filsh/yii2-wamp

Extension for WAMP(Web Application Messaging Protocol)

  • Friday, September 18, 2015
  • by Filsh
  • Repository
  • 3 Watchers
  • 3 Stars
  • 85 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

yii2-wamp-router

Installation

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"
    }
}

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();
            }
        );
});

The Versions

18/09 2015

dev-master

9999999-dev https://github.com/filsh/yii2-wamp

Extension for WAMP(Web Application Messaging Protocol)

  Sources   Download

MIT

The Requires

 

by Igor Maliy

module yii