Skip to content

Commit 102eba2

Browse files
StartAutomatingStartAutomating
StartAutomating
authored and
StartAutomating
committed
docs: Get-WebSocket examples
1 parent 1715d05 commit 102eba2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ To stop watching a websocket, simply stop the background job.
5252
# Create a WebSocket job that connects to a WebSocket and outputs the results.
5353
$socketServer = Get-WebSocket -RootUrl "http://localhost:8387/" -HTML "<h1>WebSocket Server</h1>"
5454
$socketClient = Get-WebSocket -SocketUrl "ws://localhost:8387/"
55+
foreach ($n in 1..10) { $socketServer.Send(@{n=Get-Random}) }
56+
$socketClient | Receive-Job -Keep
5557
~~~
5658
#### Get-WebSocket Example 2
5759

0 commit comments

Comments
 (0)