All Projects → fre5h → CentrifugoBundle

fre5h / CentrifugoBundle

Licence: MIT license
📦 Provides communication with web-socket server Centrifugo in Symfony applications.

Programming Languages

PHP
23972 projects - #3 most used programming language
Twig
543 projects

Projects that are alternatives of or similar to CentrifugoBundle

socketio
No description or website provided.
Stars: ✭ 23 (-64.62%)
Mutual labels:  socket, bundle
Bus
Bus 是一个基础框架、服务套件,它基于Java8编写,参考、借鉴了大量已有框架、组件的设计,可以作为后端服务的开发基础中间件。代码简洁,架构清晰,非常适合学习使用。
Stars: ✭ 253 (+289.23%)
Mutual labels:  socket
Tcpprobe
Modern TCP tool and service for network performance observability.
Stars: ✭ 207 (+218.46%)
Mutual labels:  socket
Ssokit Qmake
A Simple & Strong Tool for TCP&UDP Debug
Stars: ✭ 231 (+255.38%)
Mutual labels:  socket
Systemjs Hot Reloader
reloads your modules as needed so that you can have satisfyingly fast feedback loop when developing your app
Stars: ✭ 215 (+230.77%)
Mutual labels:  socket
Baselibrary
🔥Android开发 常用基础公共库(mvp/mvvm/retrofit/rxjava/socket/ble/多语言) 直接下载或依赖即可使用
Stars: ✭ 243 (+273.85%)
Mutual labels:  socket
Oksocket
An blocking socket client for Android applications.
Stars: ✭ 2,359 (+3529.23%)
Mutual labels:  socket
cpp20-internet-client
An HTTP(S) client library for C++20.
Stars: ✭ 34 (-47.69%)
Mutual labels:  socket
Delphi Cross Socket
Delphi cross platform socket library
Stars: ✭ 250 (+284.62%)
Mutual labels:  socket
Node Decorators
node-decorators
Stars: ✭ 230 (+253.85%)
Mutual labels:  socket
Node Websocket Chatroom
web聊天室项目
Stars: ✭ 227 (+249.23%)
Mutual labels:  socket
Pypacker
📦 The fastest and simplest packet manipulation lib for Python
Stars: ✭ 216 (+232.31%)
Mutual labels:  socket
Unitysocketprotobuf3demo
主要实现了用Unity对接了Leaf服务器。其次带了些小工具。
Stars: ✭ 244 (+275.38%)
Mutual labels:  socket
Python Mocket
a socket mock framework - for all kinds of socket animals, web-clients included
Stars: ✭ 209 (+221.54%)
Mutual labels:  socket
ChatRoom
聊天室
Stars: ✭ 30 (-53.85%)
Mutual labels:  web-socket
Ohsce
PHP HI-REL SOCKET TCP/UDP/ICMP/Serial .高可靠性PHP通信&控制框架SOCKET-TCP/UDP/ICMP/硬件Serial-RS232/RS422/RS485 AND MORE!
Stars: ✭ 206 (+216.92%)
Mutual labels:  socket
Web Socket
Laravel library for asynchronously serving WebSockets.
Stars: ✭ 225 (+246.15%)
Mutual labels:  socket
Chattt
❯❯❯ Chat without leaving your terminal
Stars: ✭ 239 (+267.69%)
Mutual labels:  socket
MelonJS-Node-Socket.IO-Boilerplate-Example
A multiplayer melonJS + node.js + socket.io game
Stars: ✭ 28 (-56.92%)
Mutual labels:  socket
cent
Python library to communicate with Centrifugo HTTP API
Stars: ✭ 60 (-7.69%)
Mutual labels:  centrifugo

CentrifugoBundle

📦 Provides communication with web-socket server Centrifugo in Symfony applications.

Scrutinizer Quality Score Build Status CodeCov License Latest Stable Version Total Downloads StyleCI Gitter

Features 🎁

Requirements 🧐

  • PHP 8.1
  • Symfony 6.1

Installation 🌱

$ composer req fresh/centrifugo-bundle

By default, Symfony Flex adds this bundle to the config/bundles.php file and adds required environment variables into .env file. In case when you ignored contrib-recipe during bundle installation it would not be done. Then you have to do this manually.

Check the config/bundles.php file

# config/bundles.php

return [
    // Other bundles...
    Fresh\CentrifugoBundle\FreshCentrifugoBundle::class => ['all' => true],
    // Other bundles...
];

Check the .env file and add you configuration

# .env

###> fresh/centrifugo-bundle ###
CENTRIFUGO_API_KEY=secret-api-key
CENTRIFUGO_API_ENDPOINT=http://localhost:8000/api
CENTRIFUGO_SECRET=secret
###< fresh/centrifugo-bundle ###

ℹ️ Customize bundle configuration

Using 🧑‍🎓

Centrifugo service

<?php
declare(strict_types=1);

namespace App\Service;

use Fresh\CentrifugoBundle\Service\CentrifugoInterface;

class YourService
{
    private CentrifugoInterface $centrifugo;    

    public function __construct(CentrifugoInterface $centrifugo)
    {
        $this->centrifugo = $centrifugo;
    }

    public function example(): void
    {
        $this->centrifugo->publish(['foo' => 'bar'], 'channelA');
    }
}

ℹ️ More examples of using Centrifugo service

Authentication with JWT tokens 🗝️

Console commands ⚒️

  • centrifugo:publish
  • centrifugo:broadcast
  • centrifugo:unsubscribe
  • centrifugo:disconnect
  • centrifugo:presence
  • centrifugo:presence-stats
  • centrifugo:history
  • centrifugo:history-remove
  • centrifugo:channels
  • centrifugo:info

ℹ️ More examples of using console commands

Integration into Symfony Web-Profiler 🎛️

Contributing 🤝

Read the CONTRIBUTING file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].