From bba1df406da60cd6aba4a411a0b933b8a9f3779d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Jensen?= Date: Wed, 10 Jan 2024 19:23:01 +0100 Subject: [PATCH] use wss://echo.websocket.org in examples --- README.md | 4 ++-- docs/Client.md | 10 +++++----- docs/Examples.md | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 507fe92..f0adae3 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ It internally supports Upgrade handshake and implicit close and ping/pong operat Set up a WebSocket Client for request/response strategy. ```php -$client = new WebSocket\Client("ws://echo.websocket.org/"); +$client = new WebSocket\Client("wss://echo.websocket.org/"); $client // Add standard middlewares ->addMiddleware(new WebSocket\Middleware\CloseHandler()) @@ -54,7 +54,7 @@ $client->close(); Set up a WebSocket Client for continuous subscription ```php -$client = new WebSocket\Client("ws://echo.websocket.org/"); +$client = new WebSocket\Client("wss://echo.websocket.org/"); $client // Add standard middlewares ->addMiddleware(new WebSocket\Middleware\CloseHandler()) diff --git a/docs/Client.md b/docs/Client.md index 16f616e..0564991 100644 --- a/docs/Client.md +++ b/docs/Client.md @@ -9,7 +9,7 @@ The client can read and write on a WebSocket stream. Set up a WebSocket client for request/response strategy. ```php -$client = new WebSocket\Client("ws://echo.websocket.org/"); +$client = new WebSocket\Client("wss://echo.websocket.org/"); $client // Add standard middlewares ->addMiddleware(new WebSocket\Middleware\CloseHandler()) @@ -32,7 +32,7 @@ $client->close(); If you want to subscribe to messages sent by server at any point, use the listener functions. ```php -$client = new WebSocket\Client("ws://echo.websocket.org/"); +$client = new WebSocket\Client("wss://echo.websocket.org/"); $client // Add standard middlewares ->addMiddleware(new WebSocket\Middleware\CloseHandler()) @@ -55,7 +55,7 @@ Other options are available runtime by calling configuration methods. ```php // Create client -$client = new WebSocket\Client("ws://echo.websocket.org/"); +$client = new WebSocket\Client("wss://echo.websocket.org/"); $client // Use a PSR-3 compatible logger ->setLogger(Psr\Log\LoggerInterface $logger) @@ -93,7 +93,7 @@ This repo comes with two middlewares that provide standard operability according If not added, you need to handle close operation and respond to ping requests in your own implementation. ```php -$client = new WebSocket\Client("ws://echo.websocket.org/"); +$client = new WebSocket\Client("wss://echo.websocket.org/"); $client // Add CloseHandler middleware ->addMiddleware(new WebSocket\Middleware\CloseHandler()) @@ -111,7 +111,7 @@ whenever the server receives a method of the same type. All message listeners receive Client, Connection and Message as arguments. ```php -$client = new WebSocket\Client("ws://echo.websocket.org/"); +$client = new WebSocket\Client("wss://echo.websocket.org/"); $client // Listen to incoming Text messages ->onText(function (WebSocket\Client $client, WebSocket\Connection $connection, WebSocket\Message\Text $message) { diff --git a/docs/Examples.md b/docs/Examples.md index 2e87929..3e7e0aa 100644 --- a/docs/Examples.md +++ b/docs/Examples.md @@ -14,7 +14,7 @@ This is usable for debugging. For production, use a proper logger. ```php $logger = new WebSocket\Test\EchoLog(); -$client = new WebSocket\Client('ws://echo.websocket.org/'); +$client = new WebSocket\Client('wss://echo.websocket.org/'); $client->setLogger($logger); $server = new WebSocket\Server();