PHPackages                             black-m13/tcp-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. black-m13/tcp-socket

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

black-m13/tcp-socket
====================

TCP Socket for Laravel 5.4

07PHP

Since Sep 18Pushed 1y agoCompare

[ Source](https://github.com/BlackM13/TCP-Socket)[ Packagist](https://packagist.org/packages/black-m13/tcp-socket)[ RSS](/packages/black-m13-tcp-socket/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel TCP Socket
==================

[](#laravel-tcp-socket)

installation
------------

[](#installation)

For install this package Edit your project's `composer.json` file to require parsidev/tcp-socket

```
"require": {
    "parsidev/tcp-socket": "dev-master"
},
```

Now, update Composer:

```
composer update

```

Once composer is finished, you need to add the service provider. Open `config/app.php`, and add a new item to the providers array.

```
'Parsidev\Socket\SocketServiceProvider',

```

Next, add a Facade for more convenient usage. In `config/app.php` add the following line to the aliases array:

```
'Socket' => 'Parsidev\Socket\Facades\Socket',

```

Publish config files:

```
php artisan vendor:publish --provider="Parsidev\Socket\SocketServiceProvider"

```

for change username, password and other configuration change `config/tcpsocket.php`

Usage
-----

[](#usage)

### Configuration

[](#configuration)

Open `config/tcp-socket.php`

Enter Server Ip Address and Port
You can change server protocol between `SOL_TCP` and `SOL_UDP`

### Connect To Server

[](#connect-to-server)

```
$socket = Socket::connect();

$socket = Socket::connect($ip);
$socket = Socket::connect(null, $port);
$socket = Socket::connect($ip, $port);
```

### Disconnect from Server

[](#disconnect-from-server)

```
Socket::disconnect($socket);
```

### Send Message

[](#send-message)

```
Socket::sendMessage('test message'); //send message to connected server
Socket::sendMessageTo('test message', 'server ip', server port) // send message to a socket
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor1

Top contributor holds 95.7% 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.

### Community

Maintainers

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

---

Top Contributors

[![parsidev](https://avatars.githubusercontent.com/u/11275201?v=4)](https://github.com/parsidev "parsidev (44 commits)")[![BlackM13](https://avatars.githubusercontent.com/u/100307090?v=4)](https://github.com/BlackM13 "BlackM13 (2 commits)")

### Embed Badge

![Health badge](/badges/black-m13-tcp-socket/health.svg)

```
[![Health](https://phpackages.com/badges/black-m13-tcp-socket/health.svg)](https://phpackages.com/packages/black-m13-tcp-socket)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

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

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

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

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

78126.4M414](/packages/react-http)

PHPackages © 2026

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