awuxtron/websocket

The Websocket Client For PHP.

0.0.2 2022-05-29 03:30 UTC

README

License PHP Version Support Packagist Version Packagist Downloads Code style fix status Code Static Analysis Status GitHub Workflow Status

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.