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 today

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 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

2336d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0864b3f936f60c086df17ee181ff77b7efa5de266260aa8d9edccfbef0e35cb4?d=identicon)[fzhang](/maintainers/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

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M318](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M292](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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