kentczhy / swsocket

使用 swoole 容易设置 websocket

v0.1.3 2020-06-08 10:17 UTC

This package is auto-updated.

Last update: 2024-09-08 20:28:08 UTC


README

这个库提供了一种简单设置 websocket 的方法。

安装

建议的安装方法是使用 composer

composer require "kentczhy/swsocket"

使用方法

需要 PHP 扩展 Swoole > 4.2.0

config/app.php

\Kentczhy\Swsocket\Providers\SwsocketServiceProvider::class

# add config swsocket.php and copy html test file

php artisan vendor:publish
 
# start server

php artisan swoole:server