You can install the package via composer:
composer require awuxtron/websocket
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');
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.