Download the PHP package jianyan74/yii2-websocket without Composer

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

Yii2 WebSocket

即时通讯Demo

问题反馈

在使用中有任何问题,欢迎反馈给我,可以用以下联系方式跟我交流

QQ群:655084090

前提

服务器安装swoole

安装

composer执行

或者在 composer.json 加入

配置

common/config/main.php 加入以下配置

console/config/main.php 加入以下配置。(注意:配置在controllerMap里面)

使用

测试

接口文档

发送消息的格式全部以json字符串发过来

心跳

请求地址

参数

参数名 说明
type pong

无返回

进入房间

请求地址

参数

参数名 说明
type login
room_id 房间id
user_id 用户id
nickname 用户昵称
head_portrait 用户头像

返回(1)

返回(2)

当前登录的人还会返回一个在线列表

发言

请求地址

参数

参数名 说明
type say
to_client_id 对谁说话:默认 all
content 内容

返回

送礼物

请求地址

参数

参数名 说明
type gift
gift_id 礼物id

返回

离开房间

请求地址

参数

参数名 说明
type leave

返回


All versions of yii2-websocket with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
yiisoft/yii2 Version *
yiisoft/yii2-redis 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 jianyan74/yii2-websocket contains the following files

Loading the files please wait ....