Download the PHP package xiaochengfu/yii2-swoole without Composer

On this page you can find all versions of the php package xiaochengfu/yii2-swoole. 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 yii2-swoole

yii2 Swoole 扩展

如仅需要websocket,或者需要支持laravel/thinkphp/yii2等框架,请移步最新扩展 websocket-swoole 不再受框架限制

扩展内容主要包括: 一.异步任务队列 这里根据不同的需求,我设计了三种不同的异步处理方法

二.websocket通信 本扩展以websocket为基础服务,所以可以处理websocket的请求,多客户端连接通信,通过自定义命令来实时处理业务

三.基于websocket的实时推送 服务端有消息变更时,通过向客户端推送消息,来达到消息的同步和实时反馈``

四.简单的启动/关闭/重启/状态获取命令

swoole版本要求:>=1.8.1

实现原理

适用场景

需要客户端触发的耗时请求,客户端无需等待返回结果 websocket的这种场景

安装

如何使用

安装前准备: 1.需要安装curl扩展,

2.需要安装mongodb,因为有部分异步任务是需要存储到mongodb中


1、修改common/config/params.php

2.上一步中,我把pidfile和log目录单独定义到了swoolelog目录下,如果你也采用相同的方法,你需要设置swoolelog别名,并创建swoolelog目录 修改common/bootstrap.php,添加如下内容:

3、在console/config/main.php配置文件中增加controllerMap

4、在主配置文件中增加components

5.在前端应用下(frontend/config/main.php),添加modules,通过访问http://ip/swoole来测试

6、服务管理

7、测试 a.通过分别访问front/swoole/default/index|mongo|del|来测试异步任务 b.通过访问front/swoole/default/push来测试websocket推送,fd为1,客户端需要自己建立连接, 网页在线测试客户端链接地址:http://www.blue-zero.com/WebSocket/ c.通过执行

来测试命令行的异步任务

大家如果有问题要交流,就发在这里吧: https://github.com/xiaochengfu/yii2-swoole/issues/1 如有疑问:请加QQ:1033426413,验证信息:swoole接入,我会来交流区查看的


All versions of yii2-swoole with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 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 xiaochengfu/yii2-swoole contains the following files

Loading the files please wait ....