Created
September 5, 2014 12:51
-
-
Save dfch/d598378f8a162a9bdf5b to your computer and use it in GitHub Desktop.
Receiving SignalR messages from PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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