mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-18 02:13:00 +08:00
Fix WebSocket URI format and remove unnecessary null-forgiving operator
Co-authored-by: chkr1011 <6939810+chkr1011@users.noreply.github.com>
This commit is contained in:
co-authored by
chkr1011
parent
16f8765562
commit
9cf9a714cb
@@ -78,7 +78,7 @@ Write-Host "`nTesting WebSocket connection..." -ForegroundColor Yellow
|
||||
$wsSession = New-MqttSession
|
||||
|
||||
try {
|
||||
Connect-MqttSession -Session $wsSession -WebSocketUri "broker.hivemq.com:8000/mqtt"
|
||||
Connect-MqttSession -Session $wsSession -WebSocketUri "ws://broker.hivemq.com:8000/mqtt"
|
||||
Write-Host "Connected via WebSocket!" -ForegroundColor Green
|
||||
|
||||
Publish-MqttMessage -Session $wsSession -Topic "test/websocket" -Payload "Hello via WebSocket!"
|
||||
|
||||
Reference in New Issue
Block a user