PHPackages                             alexpts/php-transports - 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. alexpts/php-transports

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

alexpts/php-transports
======================

Any transports

0.1.0(5y ago)09[1 PRs](https://github.com/alexpts/php-transports/pulls)MITPHPPHP ~8.0CI failing

Since Sep 28Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/alexpts/php-transports)[ Packagist](https://packagist.org/packages/alexpts/php-transports)[ Docs](https://github.com/alexpts/php-transports)[ RSS](/packages/alexpts-php-transports/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

Transports
==========

[](#transports)

[![Build Status](https://camo.githubusercontent.com/4ca4289b83a35cebd2c1fdc1995db59fe29ab7ecd456336bca10b6cad38b3c98/68747470733a2f2f7472617669732d63692e6f72672f616c65787074732f7068702d7472616e73706f7274732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/alexpts/php-transports)[![Code Coverage](https://camo.githubusercontent.com/197e874f2ffe238f19dabd2f6f3bc362c4b19209e09cef0c97e07704c592e06f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c65787074732f7068702d7472616e73706f7274732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/alexpts/php-transports/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5246e752b9ba83e358f7fecdc2c9a81a0746544a9441458dcfe6b8ebbc2714d3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c65787074732f7068702d7472616e73706f7274732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/alexpts/php-transports/?branch=master)

### Install

[](#install)

`composer require alexpts/php-transports`

Support `tcp`, `udp`, `file`, `unix socket` transports

```
use PTS\Transport\File;
use PTS\Transport\Tcp\TcpSocket;
use PTS\Transport\Udp\UdpSocket;
use PTS\Transport\UnixSocket;

$udp = new UdpSocket;
$udp->connect('127.0.0.1', ['port' => 3000]);
$udp->write('some message');
$udp->close();

$unix = new UnixSocket;
$unix->connect(__DIR__ . '/controller.sock');
$unix->write('some command');
$unix->close();

$tcp = new TcpSocket;
$tcp->connect('127.0.0.1', ['port' => 3000]);
$tcp->write('some message');
$tcp->close();

$file = new File;
$file->connect(__DIR__ . '/log.txt', ['mode' => 'w+']);
$file->write('some message');
$file->close();
```

###  Health Score

32

↑

LowBetter than 72% of packages

Maintenance54

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Total

2

Last Release

1991d ago

PHP version history (2 changes)0.0.1PHP ~7.2

0.1.0PHP ~8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/31106536118e11bf9d0c9d7f467db5b534efa9c46ee76680b308f0c39d9a798c?d=identicon)[alexpts](/maintainers/alexpts)

---

Top Contributors

[![alexpts](https://avatars.githubusercontent.com/u/1306916?v=4)](https://github.com/alexpts "alexpts (18 commits)")

---

Tags

unixtcpSockettransportnetudp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alexpts-php-transports/health.svg)

```
[![Health](https://phpackages.com/badges/alexpts-php-transports/health.svg)](https://phpackages.com/packages/alexpts-php-transports)
```

###  Alternatives

[hhxsv5/laravel-s

🚀 LaravelS is an out-of-the-box adapter between Laravel/Lumen and Swoole.

3.9k676.0k10](/packages/hhxsv5-laravel-s)[clue/socket-raw

Simple and lightweight OOP wrapper for PHP's low-level sockets extension (ext-sockets).

35111.1M48](/packages/clue-socket-raw)[hprose/hprose

It is a modern, lightweight, cross-language, cross-platform, object-oriented, high performance, remote dynamic communication middleware. It is not only easy to use, but powerful. You just need a little time to learn, then you can use it to easily construct cross language cross platform distributed application system.

2.1k215.3k37](/packages/hprose-hprose)

PHPackages © 2026

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