diff options
| author | Tim Hobbs <jesus.tesh@gmail.com> | 2014-03-28 16:15:17 -0700 |
|---|---|---|
| committer | Tim Hobbs <jesus.tesh@gmail.com> | 2014-03-28 16:15:17 -0700 |
| commit | 40d07e89ad1ace9647aeab82978e43077e0ce572 (patch) | |
| tree | ac42c23908911099ebc2840bc6b9549de565bab6 /MediaBrowser.Server.Implementations | |
| parent | b95f8f5f5cd59d7c2e50e4eee018eccc7fd05216 (diff) | |
| parent | 5e5b1f180c2a13152c8f318f045547c6508c5b3e (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'MediaBrowser.Server.Implementations')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Roku/RokuSessionController.cs | 11 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/Session/WebSocketController.cs | 12 |
2 files changed, 23 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Roku/RokuSessionController.cs b/MediaBrowser.Server.Implementations/Roku/RokuSessionController.cs index 0e2f9e1b57..d806db1e0b 100644 --- a/MediaBrowser.Server.Implementations/Roku/RokuSessionController.cs +++ b/MediaBrowser.Server.Implementations/Roku/RokuSessionController.cs @@ -146,5 +146,16 @@ namespace MediaBrowser.Server.Implementations.Roku RequestContentType = "application/json" }); } + + + public Task SendGenericCommand(GenericCommand command, CancellationToken cancellationToken) + { + return SendCommand(new WebSocketMessage<GenericCommand> + { + MessageType = "Command", + Data = command + + }, cancellationToken); + } } } diff --git a/MediaBrowser.Server.Implementations/Session/WebSocketController.cs b/MediaBrowser.Server.Implementations/Session/WebSocketController.cs index 70d7ac071f..ddf4ec2ca7 100644 --- a/MediaBrowser.Server.Implementations/Session/WebSocketController.cs +++ b/MediaBrowser.Server.Implementations/Session/WebSocketController.cs @@ -198,5 +198,17 @@ namespace MediaBrowser.Server.Implementations.Session }, cancellationToken); } + + public Task SendGenericCommand(GenericCommand command, CancellationToken cancellationToken) + { + var socket = GetActiveSocket(); + + return socket.SendAsync(new WebSocketMessage<GenericCommand> + { + MessageType = "Command", + Data = command + + }, cancellationToken); + } } } |
