Download the PHP package workbunny/webman-push-server without Composer

On this page you can find all versions of the php package workbunny/webman-push-server. 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 webman-push-server

workbunny

workbunny/webman-push-server

🐇 Webman plugin for push server implementation. 🐇

Build Status Latest Stable Version PHP Version Require GitHub license

说明

简介

架构

约定

配置说明

配置信息及对应功能在代码注释中均有解释,详见对应代码注释;

频道说明

push-server支持以下三种频道类型:

事件说明

1. 默认 event 遵守以下的约定规范:

2. event支持自定义注册

使用

服务端

1. 环境依赖

2. 安装使用

3. 服务说明

push-server服务

api-server服务

open-apis列表:
method url 描述
POST /apps/[app_id]/events 对应的pusher文档地址
POST /apps/[app_id]/batch_events 对应的pusher文档地址
GET /apps/[app_id]/channels 对应的pusher文档地址
GET /apps/[app_id]/channels/[channel_name] 对应的pusher文档地址
POST /apps/[app_id]/users/[user_id]/terminate_connections 对应的pusher文档地址
GET /apps/[app_id]/channels/[channel_name]/users 对应的pusher文档地址

客户端

javascript客户端

1. 安装

TIps:每 new 一个 Push 会创建一个连接。

2.客户端订阅公共频道

TIps:频道和事件可以是任意符合约定前缀的字符串,不需要服务端预先配置。

3.客户端订阅私有/状态频道

Tips:您需要先实现用于鉴权的接口服务

Tips:样例鉴权接口详见 config/plugin/workbunny/webman-push-server/route.php

Tips:样例鉴权接口详见 config/plugin/workbunny/webman-push-server/route.php

4.客户端推送

Tips:

5. wss代理(SSL)

Tips:

wss开头,不写端口,必须使用ssl证书对应的域名连接


websocket-php客户端

1. 创建连接

2. 订阅/退订

3. 触发消息

4. 事件注册回调

5. 其他


open-apis-php客户端

1. 安装

  1. 或者使用\Workbunny\WebmanPushServer\ApiClient 【建议使用】

  2. 使用pusher提供的api客户端 【不建议使用,客户端请求没有使用keep-alive】

2. 推送

3. 其他功能详见open-apis列表


其他客户端



进阶用法

1. push-server中间件服务

在一些服务器监控场景下,我们需要获取全量的往来信息,包括客户端的消息和服务端的回执等

Tips:

2. push-server onMessage中间件

我们在使用过程中可能需要为push-server的onMessage做一些安全性考虑或者数据过滤和拦截的功能,那么消息中间件非常适合该场景

Tips:

3. 自定义事件响应

我们在使用过程中,可能需要自定义事件响应客户端的消息,那么我们可以创建一个自定义响应类

Tips:

4. 自定义内部广播事件

内部广播默认存在client事件和server事件,push-server默认只会响应该两种事件,如果我们需要对其他额外的内部事件进行处理时可使用该方案

Tips:

5. 高阶部署

分布式部署

push-server api-server分离部署

Tips:

6. 二次开发

在一些场景下,我们可能需要对push-server进行二次开发,那么我们可以使用组合式拓展开发,以实现对push-server的拓展


All versions of webman-push-server with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-json Version *
ext-redis Version *
webman/console Version ^1.0
illuminate/redis Version ^9.0 | ^10.0 | ^11.0
workerman/redis Version ^2.0
guzzlehttp/guzzle Version ^7.0 | ^8.0
monolog/monolog Version ^2.0 | ^3.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 workbunny/webman-push-server contains the following files

Loading the files please wait ....