awuxtron / websocket
The Websocket Client For PHP.
Fund package maintenance!
awuxtron
Requires
- php: ^8.1
- guzzlehttp/psr7: ^2.2
- ratchet/rfc6455: ^0.3.1
Requires (Dev)
- awuxtron/devtools: dev-main
- pestphp/pest: ^1.21
This package is auto-updated.
Last update: 2024-11-10 02:24:55 UTC
README
The Websocket Client For PHP.
Installation
You can install the package via composer:
composer require awuxtron/websocket
Usage
use Awuxtron\Websocket\Client; use Awuxtron\Websocket\Enums\CloseStatus; $client = new Client('ws://localhost:8080'); $socket = $client->connect(); $socket->send('hello'); echo $socket->read(); $socket->close(CloseStatus::NORMAL, 'Success');
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.