Download the PHP package zgldh/workerboy without Composer

On this page you can find all versions of the php package zgldh/workerboy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package workerboy

请移步这里: http://workerman.net/gatewaydoc/work-with-other-frameworks/README.html

水平有限,workerboy坑了 This package is deprecated.

Workerboy

Workerboy是Workerman3在Laravel5下的封装。

装上以后就可以用Laravel的artisan命令来管理workerman了。

依赖

PHP 5.4

本产品依赖 PHP的"ext-sockets" 扩展。Windows下就别想了。

为了提升性能,推荐安装"ext-libevent" 扩展。看这里: http://www.workerman.net/install

更新

用法

  1. composer require zgldh/workerboy
  2. config\app.phpproviders数组添加 zgldh\workerboy\WorkerBoyServiceProvider
  3. php artisan vendor:publish 将workerboy.php配置项输出到config目录下。
  4. php artisan workerboy:create MyApplication 新建一个Workerman3应用。
  5. 编辑Event.php文件。写业务逻辑。
  6. config/workerboy.phpapplications数组里增加刚刚添加的Workerman3应用。
  7. php artisan workerboy:start --deamon 启动所有Workerman3应用。

命令

具体请看: http://doc3.workerman.net/install/start-and-stop.html

凭证机制

开发者常遇痛点:WebSocket连上了,如何告诉Socket服务器当前连上的是Web服务器里的哪个用户呢? 直接在连接的时候写上UserId?那太不保险了。 Workerboy为了解决该问题而产生了凭证机制,用于同步Web服务器用户ID和Socket服务器ClientId。

一共3步:

  1. 在做WebSocket的页面输出一个凭证:

  2. 在WebSocket连接时将凭证传过去:

  3. 在Event.php里面验证凭证:

    这样你就拿到了当前Socket连接用户在Web服务器里的UserId了。

    凭证机制默认使用Laravel的Session进行储存,你可以修改config/workerboy.phpcredential_processor项来自定义凭证机制。

Workerman 3.0

GitHub: https://github.com/walkor/workerman

Home page:http://www.workerman.net

Documentation:http://doc3.workerman.net


All versions of workerboy with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
ext-sockets Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zgldh/workerboy contains the following files

Loading the files please wait ....