PHPackages                             code-tool/socket-client - 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. code-tool/socket-client

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

code-tool/socket-client
=======================

Socket client for PHP-HTTP

2.1.3(2y ago)038.6k↓30%3MITPHPPHP &gt;=7.1

Since Dec 18Pushed 2y agoCompare

[ Source](https://github.com/code-tool/socket-client)[ Packagist](https://packagist.org/packages/code-tool/socket-client)[ RSS](/packages/code-tool-socket-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (10)Versions (17)Used By (0)

Socket Client for PHP HTTP
==========================

[](#socket-client-for-php-http)

[![Latest Version](https://camo.githubusercontent.com/1d6d6f85992ddb2ec6e89696a3115fadb483fa9d3d7ee0f4f64543d06da70a0c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7068702d687474702f736f636b65742d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://github.com/php-http/socket-client/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/31297b236e2ad5fddd8ec4d4fac0aec9f4188435cb474da0064f37251d71c5fb/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7068702d687474702f736f636b65742d636c69656e742e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.org/php-http/socket-client)[![Code Coverage](https://camo.githubusercontent.com/deb07c560b8cf2f73be11854ee1228c4251d1effd963966fe199db6ca3034f9d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7068702d687474702f736f636b65742d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/php-http/socket-client)[![Quality Score](https://camo.githubusercontent.com/8d1fe8dec79f390b10a0dd01db86f3b8735e3275d5062462a2aa520439c199d9/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7068702d687474702f736f636b65742d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/php-http/socket-client)[![Total Downloads](https://camo.githubusercontent.com/cd30e1d6cad8498e821ad05dcc723c33339b641a05f2b865212d72dcc62c76b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068702d687474702f736f636b65742d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/php-http/socket-client)

The socket client use the stream extension from PHP, which is integrated into the core.

Features
--------

[](#features)

- TCP Socket Domain (tcp://hostname:port)
- UNIX Socket Domain (unix:///path/to/socket.sock)
- TLS / SSL Encyrption
- Client Certificate (only for php &gt; 5.6)

Installation and Usage
----------------------

[](#installation-and-usage)

[Read the documentation at http://docs.php-http.org/en/latest/clients/socket-client.html](http://docs.php-http.org/en/latest/clients/socket-client.html)

Testing
-------

[](#testing)

First launch the http server:

```
$ ./vendor/bin/http_test_server > /dev/null 2>&1 &
```

Then generate ssh certificates:

```
$ cd ./tests/server/ssl
$ ./generate.sh
$ cd ../../../
```

Note: If you are running this on macOS and get the following error: "Error opening CA Private Key privkey.pem", check [this](ssl-macOS.md) file.

Now run the test suite:

```
$ composer test
```

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

[](#contributing)

Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html).

Security
--------

[](#security)

If you discover any security related issues, please contact us at .

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 65.3% 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 ~197 days

Recently: every ~297 days

Total

16

Last Release

846d ago

Major Versions

v0.2.0 → v1.0.02016-01-26

v1.4.1 → 2.0.0-beta12019-12-11

PHP version history (4 changes)v0.1.0PHP &gt;=5.4

v1.2.0PHP ^5.5 || ^7.0

2.0.0-beta1PHP ^7.1

2.1.0PHP &gt;=7.1

### Community

Maintainers

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

---

Top Contributors

[![joelwurtz](https://avatars.githubusercontent.com/u/90466?v=4)](https://github.com/joelwurtz "joelwurtz (66 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (19 commits)")[![sagikazarmark](https://avatars.githubusercontent.com/u/1226384?v=4)](https://github.com/sagikazarmark "sagikazarmark (3 commits)")[![asp24](https://avatars.githubusercontent.com/u/488588?v=4)](https://github.com/asp24 "asp24 (3 commits)")[![flavioheleno](https://avatars.githubusercontent.com/u/471860?v=4)](https://github.com/flavioheleno "flavioheleno (1 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (1 commits)")[![mrmiagi](https://avatars.githubusercontent.com/u/1648085?v=4)](https://github.com/mrmiagi "mrmiagi (1 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (1 commits)")[![xabbuh](https://avatars.githubusercontent.com/u/1957048?v=4)](https://github.com/xabbuh "xabbuh (1 commits)")[![ajgarlag](https://avatars.githubusercontent.com/u/388184?v=4)](https://github.com/ajgarlag "ajgarlag (1 commits)")[![yeclense](https://avatars.githubusercontent.com/u/3920379?v=4)](https://github.com/yeclense "yeclense (1 commits)")[![andrew-demb](https://avatars.githubusercontent.com/u/12499813?v=4)](https://github.com/andrew-demb "andrew-demb (1 commits)")[![bastnic](https://avatars.githubusercontent.com/u/84887?v=4)](https://github.com/bastnic "bastnic (1 commits)")[![driehle](https://avatars.githubusercontent.com/u/1586788?v=4)](https://github.com/driehle "driehle (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/code-tool-socket-client/health.svg)

```
[![Health](https://phpackages.com/badges/code-tool-socket-client/health.svg)](https://phpackages.com/packages/code-tool-socket-client)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[php-http/client-common

Common HTTP Client implementations and tools for HTTPlug

1.1k225.5M571](/packages/php-http-client-common)[kriswallsmith/buzz

Lightweight HTTP client

2.0k31.3M443](/packages/kriswallsmith-buzz)[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[php-http/socket-client

Socket client for PHP-HTTP

812.5M45](/packages/php-http-socket-client)[laudis/neo4j-php-client

Neo4j-PHP-Client is the most advanced PHP Client for Neo4j

184616.9k31](/packages/laudis-neo4j-php-client)

PHPackages © 2026

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