Download the PHP package php-websocket-rpc/rpc-client without Composer
On this page you can find all versions of the php package php-websocket-rpc/rpc-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download php-websocket-rpc/rpc-client
More information about php-websocket-rpc/rpc-client
Files in php-websocket-rpc/rpc-client
Download php-websocket-rpc/rpc-client
More information about php-websocket-rpc/rpc-client
Files in php-websocket-rpc/rpc-client
Vendor php-websocket-rpc
Package rpc-client
Short Description Async RPC client over WebSocket using amphp and msgpack
License MIT
Homepage https://github.com/php-websocket-rpc/rpc-client
Package rpc-client
Short Description Async RPC client over WebSocket using amphp and msgpack
License MIT
Homepage https://github.com/php-websocket-rpc/rpc-client
Please rate this library. Is it a good library?
Informations about the package rpc-client
php-websocket-rpc/rpc-client
Async RPC client over WebSocket using amphp and msgpack.
Install
Requires PHP 8.5+, ext-msgpack, and the amphp ecosystem.
Quick Start
Authentication
Authenticating
Use the built-in AuthService contract to authenticate:
Handling Auth Errors
Logout
Features
- Contract proxies —
createProxy()generates a dynamic proxy from any interface usingproxy-manager-lts - 5 patterns — call/response, notification, streaming, subscribe, publish
- Authentication — built-in
AuthServicecontract with typed exceptions - Fire-and-forget — notifications with no response
- Stream subscriptions — async iterables for streaming data (supports
foreach) - Publish/Subscribe — named channels with
#[RpcSubscribe]/#[RpcPublish] - Middleware — client-side middleware pipeline
Contract Proxies
Define a shared interface:
Use it transparently:
The proxy is generated by friendsofphp/proxy-manager-lts using NullObjectFactory + AccessInterceptorValueHolderFactory — no eval() or runtime code generation.
Key Classes
| Class | Purpose |
|---|---|
PhpWebsocketRpc\RpcClient\Client\RpcClient |
Main client — connect, create proxies, close |
PhpWebsocketRpc\RpcClient\Client\ContractProxyFactory |
Generates dynamic proxies from interfaces |
PhpWebsocketRpc\RpcClient\Client\PendingRequestStore |
Tracks in-flight requests |
PhpWebsocketRpc\RpcClient\Client\SubscriptionManager |
Manages active stream subscriptions |
PhpWebsocketRpc\Rpc\Transport\FramedConnection |
Low-level framed WebSocket connection |
PhpWebsocketRpc\Rpc\Contract\AuthService |
Built-in auth contract |
PhpWebsocketRpc\Rpc\Auth\User |
Authenticated user value object |
PhpWebsocketRpc\Rpc\Exception\AuthenticationException |
Auth failure (-32010) |
PhpWebsocketRpc\Rpc\Exception\AuthorizationException |
Forbidden (-32011) |
All versions of rpc-client with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.5
ext-msgpack Version *
amphp/amp Version ^3
amphp/websocket-client Version ^2
friendsofphp/proxy-manager-lts Version ^1.0
php-websocket-rpc/rpc Version ^0.1
ext-msgpack Version *
amphp/amp Version ^3
amphp/websocket-client Version ^2
friendsofphp/proxy-manager-lts Version ^1.0
php-websocket-rpc/rpc Version ^0.1
The package php-websocket-rpc/rpc-client contains the following files
Loading the files please wait ...