Skip to content

awuxtron/websocket

Repository files navigation

The Websocket Client For PHP.

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.

About

The Websocket Client For PHP.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages