PHPackages                             bongrun/brsocket-php - 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. bongrun/brsocket-php

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

bongrun/brsocket-php
====================

Socket PHP часть

0.0.2(9y ago)02Apache License 2.0PHPPHP &gt;=7.0

Since Oct 3Pushed 9y ago1 watchersCompare

[ Source](https://github.com/bongrun/brsocket-php)[ Packagist](https://packagist.org/packages/bongrun/brsocket-php)[ Docs](https://github.com/bongrun/brsocket-node)[ RSS](/packages/bongrun-brsocket-php/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

BRSocket PHP
============

[](#brsocket-php)

Socket на php. Отлылаем события в очередь RabbitMQ.

Установка
---------

[](#установка)

Предпочтительный способ установить это расширение через [composer](http://getcomposer.org/download/).

Либо запустить

```
php composer.phar require --prefer-dist bongrun/brsocket-node "*"

```

или добавить

```
"bongrun/brsocket-node": "*"

```

в файл `composer.json`.

Конфигурация
------------

[](#конфигурация)

Указать ключи от своих аккаунтов и от куда по умолчанию будут приходить смс сообщения.

```
$queueConfig = [
    'host' => env('RABBITMQ_HOST', '127.0.0.1'),
    'port' => env('RABBITMQ_PORT', 5672),

    'vhost' => env('RABBITMQ_VHOST', '/'),
    'login' => env('RABBITMQ_LOGIN', 'guest'),
    'password' => env('RABBITMQ_PASSWORD', 'guest'),

    'queue' => env('RABBITMQ_QUEUE'), // name of the default queue,

    'exchange_declare' => env('RABBITMQ_EXCHANGE_DECLARE', true), // create the exchange if not exists
    'queue_declare_bind' => env('RABBITMQ_QUEUE_DECLARE_BIND', true), // create the queue if not exists and bind to the exchange

    'queue_params' => [
        'passive' => env('RABBITMQ_QUEUE_PASSIVE', false),
        'durable' => env('RABBITMQ_QUEUE_DURABLE', true),
        'exclusive' => env('RABBITMQ_QUEUE_EXCLUSIVE', false),
        'auto_delete' => env('RABBITMQ_QUEUE_AUTODELETE', false),
    ],
    'exchange_params' => [
        'name' => env('RABBITMQ_EXCHANGE_NAME', null),
        'type' => env('RABBITMQ_EXCHANGE_TYPE', 'direct'), // more info at http://www.rabbitmq.com/tutorials/amqp-concepts.html
        'passive' => env('RABBITMQ_EXCHANGE_PASSIVE', false),
        'durable' => env('RABBITMQ_EXCHANGE_DURABLE', true), // the exchange will survive server restarts
        'auto_delete' => env('RABBITMQ_EXCHANGE_AUTODELETE', false),
    ],
];

$socket = new BongRun/Socket();
```

Создаём экземпляр события
-------------------------

[](#создаём-экземпляр-события)

```
$event = $socket->instance('newMessage');
```

#### Настраиваем событие и запускам

[](#настраиваем-событие-и-запускам)

```
$event->nowSigned();
    ->setSendType(BongRun/Event::SEND_TYPE_AUTHORIZED)
    ->setUsers([1,40,42])
    ->add(['text' => 'Сообщение 1'])
    ->add(['text' => 'Сообщение 2'])
    ->run();
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Every ~0 days

Total

2

Last Release

3557d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12099016?v=4)[Vlad Pasechnik](/maintainers/jumper423)[@jumper423](https://github.com/jumper423)

---

Top Contributors

[![jumper423](https://avatars.githubusercontent.com/u/12099016?v=4)](https://github.com/jumper423 "jumper423 (5 commits)")

---

Tags

phpeventwebsocketSocket

### Embed Badge

![Health badge](/badges/bongrun-brsocket-php/health.svg)

```
[![Health](https://phpackages.com/badges/bongrun-brsocket-php/health.svg)](https://phpackages.com/packages/bongrun-brsocket-php)
```

###  Alternatives

[basement-chat/basement-chat

Add a real-time chat widget to your Laravel application.

4984.0k](/packages/basement-chat-basement-chat)[warriorxk/phpwebsockets

A websocket library with support for IPC using socket pairs

1325.5k](/packages/warriorxk-phpwebsockets)[morozovsk/yii2-websocket

simple php websocket server with examples and demo: simple chat (single daemon) - http://sharoid.ru/chat.html , pro chat (master + worker) - http://sharoid.ru/chat2.html , simple game - http://sharoid.ru/game.html

9415.2k](/packages/morozovsk-yii2-websocket)[sockeon/sockeon

Framework-agnostic PHP WebSocket and HTTP server library with attribute-based routing and support for namespaces and rooms.

291.5k2](/packages/sockeon-sockeon)[hemiframe/php-websocket

PHP WebSocket server and client library

4811.2k](/packages/hemiframe-php-websocket)[morozovsk/websocket-examples

examples for simple php websocket server: simple chat (single daemon) - http://sharoid.ru/chat.html , pro chat (master + worker) - http://sharoid.ru/chat2.html , simple game - http://sharoid.ru/game.html

372.4k](/packages/morozovsk-websocket-examples)

PHPackages © 2026

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