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)039.7k↓45.7%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 2d 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 79% 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

892d 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://avatars.githubusercontent.com/u/54383831?v=4)[T A](/maintainers/Programmer)[@programmer](https://github.com/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.5k5.9M738](/packages/sylius-sylius)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[kriswallsmith/buzz

Lightweight HTTP client

2.0k32.2M466](/packages/kriswallsmith-buzz)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

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