Skip to content

Commit 1688a7a

Browse files
author
James Brundage
committed
release: WebSocket 0.1.3
Updating Module Version and release notes
2 parents 20bdf0d + bc3a562 commit 1688a7a

File tree

5 files changed

+8
-2
lines changed

5 files changed

+8
-2
lines changed

README.md

+2
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

docs/Get-WebSocket.md

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Create a WebSocket job that connects to a WebSocket and outputs the results.
3131
```PowerShell
3232
$socketServer = Get-WebSocket -RootUrl "http://localhost:8387/" -HTML "<h1>WebSocket Server</h1>"
3333
$socketClient = Get-WebSocket -SocketUrl "ws://localhost:8387/"
34+
foreach ($n in 1..10) { $socketServer.Send(@{n=Get-Random}) }
35+
$socketClient | Receive-Job -Keep
3436
```
3537
Get is the default verb, so we can just say WebSocket.
3638
`-Watch` will output a continous stream of objects from the websocket.

docs/README.md

+2
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

docs/_data/Help/Get-WebSocket.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
{
3838
"Title": "EXAMPLE 1",
3939
"Markdown": "Create a WebSocket job that connects to a WebSocket and outputs the results.",
40-
"Code": "$socketServer = Get-WebSocket -RootUrl \"http://localhost:8387/\" -HTML \"<h1>WebSocket Server</h1>\"\n$socketClient = Get-WebSocket -SocketUrl \"ws://localhost:8387/\""
40+
"Code": "$socketServer = Get-WebSocket -RootUrl \"http://localhost:8387/\" -HTML \"<h1>WebSocket Server</h1>\"\n$socketClient = Get-WebSocket -SocketUrl \"ws://localhost:8387/\"\nforeach ($n in 1..10) { $socketServer.Send(@{n=Get-Random}) }\n$socketClient | Receive-Job -Keep"
4141
},
4242
{
4343
"Title": "EXAMPLE 2",

docs/_data/LastDateBuilt.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2025-03-07"
1+
"2025-03-22"

0 commit comments

Comments
 (0)