PHPackages                             jimmyfen/websocket-server - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. jimmyfen/websocket-server

ActiveLibrary[HTTP &amp; Networking](/categories/http)

jimmyfen/websocket-server
=========================

Based on swoole websocket server

1.0.1(6y ago)313MITPHPPHP &gt;=7.0.0

Since Dec 15Pushed 6y ago1 watchersCompare

[ Source](https://github.com/jimmyfen/websocket-server)[ Packagist](https://packagist.org/packages/jimmyfen/websocket-server)[ RSS](/packages/jimmyfen-websocket-server/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (3)Used By (0)

websocket-server
================

[](#websocket-server)

websocket server based on swoole

### 使用此插件可以减少处理websocket层面的代码，更加专注业务层面的代码

[](#使用此插件可以减少处理websocket层面的代码更加专注业务层面的代码)

**一、安装**
--------

[](#一安装)

###  1. 环境

[](#1-环境)

 `PHP >= 7.0.0`

 `swoole >= 1.7.9`

 `composer`

###  2. 安装

[](#2-安装)

 `composer require jimmyfen/websocket-server`

**二、配置**
--------

[](#二配置)

```
    array(
        'HOST' => '0.0.0.0',  // 绑定监听域名
        'PORT' => 9501,       // 绑定监听端口
        'SETTING' => array(
            ...               // 此处为swoole设置参数，详情参考swoole文档
        )
    )
```

**三、项目目录**
----------

[](#三项目目录)

```
    src
     |-------conf        // 配置文件，可在此查看默认配置
     |-------lib
     |-------logs        // 默认swoole日志文件位置，若不存在且未改配置需手动创建
     |-------process

```

**四、基本使用**
----------

[](#四基本使用)

```
// 文件index.php

// 运行：php index.php start(不加参数可以看到具体的参数介绍)
```

**五、参考资料**
----------

[](#五参考资料)

###  [1. swoole官方文档](https://wiki.swoole.com)

[](#1-swoole官方文档)

###  [2. PHP call\_user\_func\_array函数文档](https://www.php.net/manual/zh/function.call-user-func-array.php)

[](#2-php-call_user_func_array函数文档)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

2389d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/116277?v=4)[fzhang](/maintainers/fzhang)[@fzhang](https://github.com/fzhang)

---

Top Contributors

[![jimmyfen](https://avatars.githubusercontent.com/u/20164271?v=4)](https://github.com/jimmyfen "jimmyfen (19 commits)")

---

Tags

phpswoolewebsocket

### Embed Badge

![Health badge](/badges/jimmyfen-websocket-server/health.svg)

```
[![Health](https://phpackages.com/badges/jimmyfen-websocket-server/health.svg)](https://phpackages.com/packages/jimmyfen-websocket-server)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.8k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M89](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
