PHPackages                             osushi/simple-socket - 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. osushi/simple-socket

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

osushi/simple-socket
====================

This library can create socket client simply. It is written by php native socket functions.

0.0.1(8y ago)3244MITPHPPHP &gt;=7.0.0

Since Oct 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Osushi/SimpleSocket)[ Packagist](https://packagist.org/packages/osushi/simple-socket)[ Docs](https://github.com/Osushi/SimpleSocket)[ RSS](/packages/osushi-simple-socket/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

SimpleSocket
============

[](#simplesocket)

[![Packagist](https://camo.githubusercontent.com/3880d35affd3655785249140def4b582d7acf0cac77788dd1164ca2b84587bea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f73757368692f73696d706c652d736f636b65742e737667)](https://packagist.org/packages/osushi/simple-socket)

Functions
---------

[](#functions)

- Create socket client simply (Now support tcp only)
- Able to write simple logic on closure after connection

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

[](#requirements)

- PHP &gt;= 7.0.\*

Usage
-----

[](#usage)

```
composer require osushi/simple-socket

```

Examples
--------

[](#examples)

See:

```
$connector = new \SimpleSocket\Connector();
$connector->connectTcp('google.com', 80)->then(function ($conn) {
  $conn->write("GET / HTTP/1.1\r\n\Host: google.com\r\n\r\n");

  var_dump($conn->read());
  /*
  string(519) "HTTP/1.1 302 Found
  ....
  "
  */

  $conn->close();
});

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

3136d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c20de329ad30a98dd3b32a22abba35ed7e0465c2d26ee85b0cd209c622fc58a2?d=identicon)[Osushi](/maintainers/Osushi)

---

Top Contributors

[![Osushi](https://avatars.githubusercontent.com/u/6112972?v=4)](https://github.com/Osushi "Osushi (14 commits)")

---

Tags

clienttcpSocket

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/osushi-simple-socket/health.svg)

```
[![Health](https://phpackages.com/badges/osushi-simple-socket/health.svg)](https://phpackages.com/packages/osushi-simple-socket)
```

###  Alternatives

[php-http/discovery

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

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

Common HTTP Client implementations and tools for HTTPlug

1.0k225.5M571](/packages/php-http-client-common)[react/http

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

78126.4M414](/packages/react-http)[clue/socket-raw

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

35111.1M48](/packages/clue-socket-raw)[africc/php-epp2

A High Level EPP (Extensible Provisioning Protocol) TCP/SSL Client for PHP

5578.1k2](/packages/africc-php-epp2)[lizhichao/one-ck

clickhouse tcp client

7524.8k4](/packages/lizhichao-one-ck)

PHPackages © 2026

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