PHPackages                             squirtle/websocket - 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. squirtle/websocket

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

squirtle/websocket
==================

Websocket client and server for Laravel

v1.0.1(1y ago)05MITPHPPHP ^8.2

Since Mar 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/gulmzugur/websocket)[ Packagist](https://packagist.org/packages/squirtle/websocket)[ RSS](/packages/squirtle-websocket/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Laravel WebSocket Client &amp; Server Package
=============================================

[](#laravel-websocket-client--server-package)

This package provides a flexible and high-performance solution that facilitates real-time communication in your Laravel applications.

Features
--------

[](#features)

- **WebSocket Client &amp; Server:** Real-time, low-latency, and scalable client-server communication.
- **Pub/Sub Management:** A flexible pub/sub architecture for efficient message publishing and sharing.
- **Event-Based Listening:** You can listen to events created for both the client and server to execute operations.
- **Extensible Architecture:** Driver and broker infrastructure easily extendable to meet your needs.

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Laravel 10.x or higher
- [Swoole](https://swoole.com/) Extension
- Redis (For broker support)

Installation
------------

[](#installation)

### Installation via Composer

[](#installation-via-composer)

Use Composer to add the package to your Laravel project:

```
composer require squirtle/websocket
```

Configuration
-------------

[](#configuration)

After installing the package, publish the configuration files:

```
php artisan vendor:publish --provider="Squirtle\WebSocket\WebSocketServiceProvider"
```

In the published `config/websocket.php` file, you can configure Swoole, Redis, and other settings according to your needs.

Usage
-----

[](#usage)

### Starting the WebSocket Client

[](#starting-the-websocket-client)

You can start your WebSocket client using the following Artisan command:

```
php artisan websocket:client
```

```
php artisan websocket:client --broker=redis --driver=swoole --host=127.0.0.1 --port=6001 --debug
```

### Starting the WebSocket Server

[](#starting-the-websocket-server)

You can start your WebSocket server using the following Artisan command:

```
php artisan websocket:serve
```

Event Listening
---------------

[](#event-listening)

By creating listener classes, you can listen to events on the WebSocket client/server and perform actions accordingly.

Extensibility
-------------

[](#extensibility)

### Extending the WebSocket Client

[](#extending-the-websocket-client)

To add your own WebSocket client driver instead of the default Swoole driver, implement the `ClientInterface`. Define the required methods and configure the package’s settings to make the new driver selectable.

### Extending the WebSocket Server

[](#extending-the-websocket-server)

By default, the Swoole driver is used, but you can add your own WebSocket driver to meet your specific needs. To do this, implement the `ServerInterface`, define the required methods, and make the new driver selectable from the package’s configuration file.

### Extending the Broker System

[](#extending-the-broker-system)

To integrate different broker systems besides Redis, implement the `PubSubManager` interface to create your custom broker class. Then, configure the necessary settings in your configuration file to activate the new broker.

Contributing
------------

[](#contributing)

We welcome your contributions! For new feature suggestions, bug fixes, and improvements, please submit a pull request or provide feedback in the issues section.

License
-------

[](#license)

This package is licensed under the MIT License. For details, please refer to the LICENSE file.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance44

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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 ~0 days

Total

2

Last Release

435d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a7727438142c81f514cf79a54e390bbc3f8daf649c22b4ffa785a9c8c743d05?d=identicon)[squirtle](/maintainers/squirtle)

---

Top Contributors

[![gulmzugur](https://avatars.githubusercontent.com/u/48634176?v=4)](https://github.com/gulmzugur "gulmzugur (3 commits)")

---

Tags

laravelwebsocketreal-timeWebSockets

### Embed Badge

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

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

###  Alternatives

[laravel/reverb

Laravel Reverb provides a real-time WebSocket communication backend for Laravel applications.

1.6k9.4M48](/packages/laravel-reverb)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[vinelab/minion

A Simple WAMP (Web Application Messaging Protocol) server and command line tool

1276.4k](/packages/vinelab-minion)[denis660/laravel-centrifugo

Centrifugo broadcaster for laravel

113164.7k](/packages/denis660-laravel-centrifugo)[laragear/preload

Effortlessly make a Preload script for your Laravel application.

119363.5k](/packages/laragear-preload)

PHPackages © 2026

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