Skip to content

Commit

Permalink
use wss://echo.websocket.org in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sirn-se committed Jan 10, 2024
1 parent 82a0166 commit bba1df4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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())
Expand Down
10 changes: 5 additions & 5 deletions docs/Client.md
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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())
Expand All @@ -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)
Expand Down Expand Up @@ -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())
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion docs/Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit bba1df4

Please sign in to comment.