sonrac / wamp-server
为laravel & lumen实现的WAMP协议
0.1.7
2018-01-04 15:14 UTC
Requires
- illuminate/console: 5.*
- illuminate/support: 5.*
- voryx/thruway: 0.5.*
Requires (Dev)
- codeception/codeception: ^2.3
- mockery/mockery: ^1.0
- phpunit/php-code-coverage: ^5.2
- phpunit/phpunit: ^6.4
- dev-master
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.0
- dev-dependabot/npm_and_yarn/Example/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/Example/engine.io-6.2.1
- dev-dependabot/npm_and_yarn/Example/socket.io-parser-4.2.1
- dev-dependabot/npm_and_yarn/Example/connect-3.6.6
- dev-dependabot/npm_and_yarn/Example/braces-3.0.2
- dev-dependabot/npm_and_yarn/Example/qs-6.2.3
- dev-dependabot/npm_and_yarn/Example/lodash-4.17.21
- dev-dependabot/npm_and_yarn/Example/json-schema-and-jsprim-0.4.0
- dev-raw-socket-transport-support
- dev-gitlab-ci
- dev-analysis-q5EVAj
- dev-dev
This package is auto-updated.
Last update: 2024-09-09 21:10:16 UTC
README
为lumen/laravel的WAMP服务器
目前处于开发状态
安装
composer require sonrac/wamp-server
或将以下内容添加到composer.json文件中的autoload部分
"sonrac/wamp-server": "0.1.*"
注册服务提供者
\sonrac\WAMP\WAMPServiceProvider
将控制台命令添加到Kernel.php
文件中
'\sonrac\WAMP\Commands\RunServer',
'\sonrac\WAMP\Commands\RegisterRoutes',
添加订阅者
app()->wampRouter->addSubscriber('com2.hello', function ($clientSession, $client) { return 123; });
添加过程
app()->wampRouter->addRoute('com1.hello', function ($clientSession, $client) { return 123; })
启动服务器
获取选项帮助的使用方法
php artisan wamp:run-server
此命令允许使用注册预定义路由的方式启动服务器
注册路由
获取选项帮助的使用方法
php artisan register-routes
注册服务提供者
\sonrac\WAMP\WAMPServiceProvider
将控制台命令添加到Kernel.php
文件中
'\sonrac\WAMP\Commands\RunServer',
'\sonrac\WAMP\Commands\RegisterRoutes',
添加订阅者
app()->wampRouter->addSubscriber('com2.hello', function ($clientSession, $client) { return 123; });
添加过程
app()->wampRouter->addRoute('com1.hello', function ($clientSession, $client) { return 123; })
启动服务器
获取选项帮助的使用方法
php artisan wamp:run-server
此命令允许使用注册预定义路由的方式启动服务器
注册路由
获取选项帮助的使用方法
php artisan register-routes
运行测试
从脚本run-tests.sh
运行测试,适用于laravel & lumen
运行命令
sh run-tests.sh