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

ActiveLibrary

shehrojkhan786/tcp-socket
=========================

TCP Socket for Laravel 5.7

5.7.x-dev(7y ago)011MITPHPPHP &gt;=7.1.3

Since Apr 24Pushed 6y agoCompare

[ Source](https://github.com/shehrojkhan786/TCP-Socket)[ Packagist](https://packagist.org/packages/shehrojkhan786/tcp-socket)[ RSS](/packages/shehrojkhan786-tcp-socket/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)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::class,

```

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::class,

```

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

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

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

2572d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/74e0cd00c640a62c2bf3b215f9f16db9b1922f8531fe774f9961ba1fc32c3c43?d=identicon)[shehrojkhan786](/maintainers/shehrojkhan786)

---

Top Contributors

[![parsidev](https://avatars.githubusercontent.com/u/11275201?v=4)](https://github.com/parsidev "parsidev (37 commits)")[![shehrojkhan786](https://avatars.githubusercontent.com/u/28523535?v=4)](https://github.com/shehrojkhan786 "shehrojkhan786 (3 commits)")

### Embed Badge

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

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

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

61214.2k26](/packages/slowlyo-owl-admin)

PHPackages © 2026

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