Download the PHP package uniondrug/swoole without Composer

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

Uniondrug Swoole (based on FastD Swoole)

THANKS:本模块来自 FastD

高性能网络服务组件. 提供底层服务封装, 基础管理及客户端调用功能. 使用 composer 进行管理, 可在此基础上进行封装整合.

环境要求

源码地址: swoole

pecl 安装

可选扩展

如果 PHP >= 7.0 的安装 2.0 版本.

源码地址: inotify

pecl 安装

安装

文档

中文文档

使用

服务继承 Uniondrug\Swoole\Server, 实现 doWork 方法, 服务器在接收信息 onReceive 回调中会调用 doWork 方法, doWork 方法接受一个封装好的请求对象。

具体逻辑在 doWork 方法中实现, doWork 方法中返回响应客户端的数据, 格式为: 字符串

Swoole 配置通过实现 configure 方法进行配置,具体配置参数请参考: Swoole 配置选项

TCP Server

UDP Server

HTTP Server

同理, Http 服务器扩展 Server 类, 实现 doRequest 方法,实现具体逻辑。

WebSocket Server

多端口支持

服务管理

File Listener

因为 swoole 是常驻内存,程序通过首次启动就自动预载到内存当中,所以每次修改都需要重启服务。

所以这里提供监听文件变化来到自动重启服务(建议开发环境中使用)

Sync Client

Client 通过 resolve 执行,通过不同的方法设置不同的回调,同步、异步均使用通用的方法。

Async Client

Process

Multi Process

Queue

License MIT


All versions of swoole with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
symfony/console Version ^3.0
uniondrug/packet Version ^2.0
uniondrug/http Version ^2.0
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 uniondrug/swoole contains the following files

Loading the files please wait ....