Download the PHP package phpdot/realtime without Composer

On this page you can find all versions of the php package phpdot/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 realtime

phpdot/realtime

A real-time WebSocket engine for PHPdot — rooms, channels, presence, and broadcast over plain JSON frames, with a Socket.IO-style Hub/Socket API and an explicit-targeting broadcast operator. It is transport-agnostic: it reaches clients only through PHPdot\Contracts\Server\ConnectionSenderInterface, so it never names a concrete server. A pluggable adapter backs membership and presence — a Swoole\Table for a single node, or Redis for a multi-node cluster.

Table of Contents

Requirements

Requirement Constraint
PHP >= 8.5
ext-swoole >= 6.2
phpdot/contracts ^0.5
psr/container ^2.0
psr/http-message ^2.0

Installation

Usage

realtime carries no DI attributes on purpose — you bind the seam in your application. The Hub reaches clients through ConnectionSenderInterface (implemented by your server's connection registry), and the Adapter/Hub must be resolved once at bootstrap, before the server forks workers, because Swoole\Table is shared memory only when created pre-fork:

The Hub is the io: it owns the fd → Socket map, onConnection, emit, to/except/direct, room(), and the transport lifecycle (handleOpen / handleMessage / handleClose). Each Socket exposes the per-connection API (emit, broadcast, join/leave, on, disconnect), and RoomFacade answers presence queries (members(), count()).

Single node vs cluster

TableAdapter coordinates rooms and presence across the workers of one instance through a Swoole\Table. For several instances behind a load balancer, bind RedisAdapter instead: every node shares membership through Redis and relays broadcasts over pub/sub. RedisSubscriber runs the blocking SUBSCRIBE loop on a dedicated connection, and Maintenance\ClusterMaintenance heartbeats each node and reaps the membership of dead peers so leaked rooms and presence are reclaimed automatically.

Architecture

Application and transport callbacks drive the Hub, which resolves Sockets and fans events out through the Adapter. The adapter is the only thing that touches storage — a Swoole\Table (single node) or Redis (cluster) — and the Hub pushes frames to clients solely through ConnectionSenderInterface, so the engine never depends on a concrete server.

Testing

License

MIT.

This repository is a read-only mirror, generated by CI from phpdot/monorepo. Pull requests and issues belong in the monorepo.


All versions of realtime with dependencies

PHP Build Version
Package Version
Requires ext-swoole Version >=6.2
php Version >=8.5
phpdot/contracts Version ^0.5
psr/container Version ^2.0
psr/http-message Version ^2.0
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 phpdot/realtime contains the following files

Loading the files please wait ...