Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Receiving SignalR messages from PowerShell
$eventName = "receiveMessage";
Add-Type -Path ".\SignalRClient.dll"
$s = New-Object SignalRClient.Connection("http://localhost/", "commandhub");
$s.Start($eventName);
while($true) {
$s.TryDequeue($eventName)
Start-Sleep -seconds 1
}
# string TryDequeue(string eventName)
# string Dequeue(string eventName)
# string Dequeue(string eventName, int dwMillisecondsTotalWaitTime)
# string Dequeue(string eventName, int dwMillisecondsTotalWaitTime, int dwMilliSecondsWaitIntervall)
# System.Collections.Generic.List[string] DequeueAll(string eventName)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.