Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 443 Bytes

File metadata and controls

21 lines (16 loc) · 443 Bytes

Talk with the web socket

This package provides communication with wss and ws protocols.

to install

composer require zeus/socket_talk

using

require_once 'vendor/autoload.php';

$webSocket=new \Zeus\SocketTalk\WebSocket('wss://echo.websocket.org');

$webSocket->connect();
//$webSocket->isConnected();
$webSocket->send(json_encode(['type'=>'ping']));
echo $webSocket->read();
//$webSocket->disconnect();