PHPackages                             exodus4d/pathfinder\_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. [Utility &amp; Helpers](/categories/utility)
4. /
5. exodus4d/pathfinder\_websocket

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

exodus4d/pathfinder\_websocket
==============================

WebSocket extension for 'Pathfinder'

v1.3.0(6y ago)6213[2 issues](https://github.com/exodus4d/pathfinder_websocket/issues)[2 PRs](https://github.com/exodus4d/pathfinder_websocket/pulls)MITPHP

Since Oct 22Pushed 4y ago1 watchersCompare

[ Source](https://github.com/exodus4d/pathfinder_websocket)[ Packagist](https://packagist.org/packages/exodus4d/pathfinder_websocket)[ RSS](/packages/exodus4d-pathfinder-websocket/feed)WikiDiscussions master Synced today

READMEChangelog (8)Dependencies (4)Versions (12)Used By (0)

WebSocket server for [Pathfinder](https://github.com/exodus4d/pathfinder)
-------------------------------------------------------------------------

[](#websocket-server-for-pathfinder)

### Requirements

[](#requirements)

- *PHP* (≥ v7.1)
- A working instance of *[Pathfinder](https://github.com/exodus4d/pathfinder)* (≥ v2.0.0-rc.1)
- [*Composer*](https://getcomposer.org/download/) to install packages for the WebSocket server

### Install

[](#install)

1. Checkout this project in a **new** folder e.g. `/var/www/websocket.pathfinder`
2. Install [*Composer*](https://getcomposer.org/download/)
3. Install Composer dependencies from `composer.json` file:

- `$ cd /var/www/websocket.pathfinder`
- `$ composer install`

3. Start WebSocket server `$ php cmd.php`

### Configuration

[](#configuration)

#### Default

[](#default)

**Clients (WebBrowser) listen for connections**

- Host: `0.0.0.0.` (=&gt; any client can connect)
- Port: `8020`
- ↪ URI: `127.0.0.1:8020`

(=&gt; Your WebServer (e.g. Nginx) should proxy all WebSocket connections to this source)

**TCP TcpSocket connection (Internal use for WebServer ⇄ WebSocket server communication)**

- Host: `127.0.0.1` (=&gt; Assumed WebServer and WebSocket server running on the same machine)
- Port: `5555`
- ↪ URI: `tcp://127.0.0.1:5555`

(=&gt; Where *Pathfinder* reaches the WebSocket server. This must match `SOCKET_HOST`, `SOCKET_PORT` options in `environment.ini`)

#### Start parameters \[Optional\]

[](#start-parameters-optional)

The default configuration should be fine for most installations. You can change/overwrite the default **Host** and **Port** configuration by adding additional CLI parameters when starting the WebSocket server:

`$ php cmd.php --wsHost [CLIENTS_HOST] --wsPort [CLIENTS_PORT] --tcpHost [TCP_HOST] --tcpPort [TCP_PORT] --debug 0`

For example: If you want to change the the WebSocket port and increase debug output:

`$ php cmd.php --wsPort 8030 --debug 3`

##### --debug (default `--debug 2`)

[](#--debug-default---debug-2)

Allows you to set log output level from `0` (silent) - errors are not logged, to `3` (debug) for detailed logging.

[![alt text](https://camo.githubusercontent.com/00e3a5b53c8edc0e75445ab7c7a862f94db05def1692838d0a650528d6117a78/68747470733a2f2f692e696d6775722e636f6d2f4b664e46346c6b2e706e67)](https://camo.githubusercontent.com/00e3a5b53c8edc0e75445ab7c7a862f94db05def1692838d0a650528d6117a78/68747470733a2f2f692e696d6775722e636f6d2f4b664e46346c6b2e706e67)

### WebSocket UI

[](#websocket-ui)

There is a WebSocket section on *Pathinders* `/setup` page. After the WebSocket server is started, you should check it if everything works. You see the most recent WebSocket log entries, the current connection state, the current number of active connections and all maps that have subscriptions

[![alt text](https://camo.githubusercontent.com/08ff1b6d895db82e56c2bba28d329c93fb6cd0cfb1c546e5428c2d7053b58984/68747470733a2f2f692e696d6775722e636f6d2f644455726e78322e706e67)](https://camo.githubusercontent.com/08ff1b6d895db82e56c2bba28d329c93fb6cd0cfb1c546e5428c2d7053b58984/68747470733a2f2f692e696d6775722e636f6d2f644455726e78322e706e67)

Log entry view. Depending on the `--debug` parameter, the most recent (max 50) entries will be shown:

[![alt text](https://camo.githubusercontent.com/e0604892a95491c9829c9eadd6f3e7b969e03e534dac9ae3ea41e80f2becf796/68747470733a2f2f692e696d6775722e636f6d2f4c496e39614e6d2e706e67)](https://camo.githubusercontent.com/e0604892a95491c9829c9eadd6f3e7b969e03e534dac9ae3ea41e80f2becf796/68747470733a2f2f692e696d6775722e636f6d2f4c496e39614e6d2e706e67)

Subscriptions for each map:

[![alt text](https://camo.githubusercontent.com/2f745a82909d5f0b9c0de616df139c59f023374e03d9e24b982ef87cda4edd63/68747470733a2f2f692e696d6775722e636f6d2f66414e5977686f2e676966)](https://camo.githubusercontent.com/2f745a82909d5f0b9c0de616df139c59f023374e03d9e24b982ef87cda4edd63/68747470733a2f2f692e696d6775722e636f6d2f66414e5977686f2e676966)

### Unix Service (systemd)

[](#unix-service-systemd)

#### New Service

[](#new-service)

It is recommended to wrap the `cmd.php` script in a Unix service, that over control the WebSocket server. This creates a systemd service on CentOS7:

1. `$ cd /etc/systemd/system`
2. `$ vi websocket.pathfinder.service`
3. Copy script and adjust `ExecStart` and `WorkingDirectory` values:

```
[Unit]
Description = WebSocket server (Pathfinder) [LIVE] environment
After = multi-user.target

[Service]
Type = idle
ExecStart = /usr/bin/php /var/www/websocket.pathfinder/pathfinder_websocket/cmd.php
WorkingDirectory = /var/www/websocket.pathfinder/pathfinder_websocket
TimeoutStopSec = 0
Restart = always
LimitNOFILE = 10000
Nice = 10

[Install]
WantedBy = multi-user.target

```

Now you can use the service to start/stop/restart your WebSocket server

- `$ systemctl start websocket.pathfinder.service`
- `$ systemctl restart websocket.pathfinder.service`
- `$ systemctl stop websocket.pathfinder.service`

#### Auto-Restart the Service

[](#auto-restart-the-service)

You can automatically restart your service (e.g. on *EVE-Online* downtime). Create a new "timer" for the automatic restart.

1. `$ cd /etc/systemd/system` (same dir as before)
2. `$ vi restart.websocket.pathfinder.timer`
3. Copy script:

```
[Unit]
Description = Restart timer (EVE downtime) for WebSocket server [LIVE]

[Timer]
OnCalendar = *-*-* 12:01:00
Persistent = true

[Install]
WantedBy = timer.target

```

Now we need a new "restart service" for the timer:

1. `$ cd /etc/systemd/system` (same dir as before)
2. `$ vi restart.websocket.pathfinder.service`
3. Copy script:

```
[Unit]
Description = Restart (periodically)  WebSocket server [LIVE]

[Service]
Type = oneshot
ExecStart = /usr/bin/systemctl try-restart websocket.pathfinder.service

```

And then, we need to either restart the machine or launch

```
systemctl start restart.websocket.pathfinder.timer

```

### Info

[](#info)

- [*Ratchet*](http://socketo.me) - "WebSockets for PHP"
- [*ReactPHP*](https://reactphp.org) - "Event-driven, non-blocking I/O with PHP"

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 98.2% 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 ~125 days

Recently: every ~177 days

Total

8

Last Release

2240d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9299033?v=4)[Mark Friedrich](/maintainers/exodus4d)[@exodus4d](https://github.com/exodus4d)

---

Top Contributors

[![exodus4d](https://avatars.githubusercontent.com/u/9299033?v=4)](https://github.com/exodus4d "exodus4d (56 commits)")[![Fumbo](https://avatars.githubusercontent.com/u/3128683?v=4)](https://github.com/Fumbo "Fumbo (1 commits)")

### Embed Badge

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

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

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k234.7M20.5k](/packages/friendsofphp-php-cs-fixer)[react/react

ReactPHP: Event-driven, non-blocking I/O with PHP.

9.1k3.6M63](/packages/react-react)[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k74.6k86](/packages/pocketmine-pocketmine-mp)[godruoyi/php-snowflake

An ID Generator for PHP based on Snowflake Algorithm (Twitter announced).

8582.3M61](/packages/godruoyi-php-snowflake)[bitwasp/bitcoin

PHP Bitcoin library with functions for transactions, signatures, serialization, Random/Deterministic ECDSA keys, blocks, RPC bindings

1.1k533.2k43](/packages/bitwasp-bitcoin)[bitwasp/buffertools

Toolbox for working with binary and hex data. Similar to NodeJS Buffer.

65764.4k41](/packages/bitwasp-buffertools)

PHPackages © 2026

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