Download the PHP package octo-php/symfony-realtime without Composer

On this page you can find all versions of the php package octo-php/symfony-realtime. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package symfony-realtime

octo-php/symfony-realtime

Package temps réel pour la plateforme async PHP — WebSocket handler, helpers SSE avancés (formatage W3C, keep-alive, reconnection), et routage HTTP/WS.

Installation

WebSocket

Configuration OpenSwoole

Le support WebSocket nécessite l'activation du mode WebSocket server dans OpenSwoole. Le RealtimeServerAdapter remplace le handler HTTP standard pour router les requêtes :

WebSocketHandler

Implémentez l'interface WebSocketHandler pour gérer les connexions :

WebSocketContext

DTO readonly contenant les informations de connexion :

Routage HTTP / WebSocket

Le RealtimeServerAdapter détecte automatiquement les requêtes d'upgrade WebSocket via les headers Upgrade: websocket + Connection: Upgrade (case-insensitive) :

Max lifetime

Chaque connexion WebSocket a un max lifetime configurable :

Variable Type Défaut Description
OCTOP_SYMFONY_WS_MAX_LIFETIME_SECONDS int (s) 3600 Durée maximale d'une connexion WebSocket

Via le bundle :

SSE avancé vs SSE basique

SSE basique (core bridge)

Le core bridge (octo-php/symfony-bridge) fournit le mécanisme de streaming : StreamedResponse avec Content-Type: text/event-stream est automatiquement streamé via ResponseFacade::write() avec compression et buffering désactivés.

C'est suffisant pour des cas simples où vous formatez les événements SSE manuellement.

SSE avancé (ce package)

Ce package fournit le protocole SSE structuré :

SseEvent

Formatage conforme à la spécification W3C :

Les données multi-lignes sont automatiquement découpées en lignes data: séparées.

SseEvent::parse() permet le round-trip : parse(format($event)) restitue les champs originaux.

SseStream

Envoi d'événements SSE via ResponseFacade::write() avec :

Métriques

Métrique Type Description
ws_connections_active gauge Connexions WebSocket actives
ws_messages_received_total counter Messages WebSocket reçus
ws_messages_sent_total counter Messages WebSocket envoyés

Licence

MIT


All versions of symfony-realtime with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
octo-php/runtime-pack Version ^0.1
octo-php/symfony-bridge Version ^0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package octo-php/symfony-realtime contains the following files

Loading the files please wait ...