diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-28 15:58:18 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-28 15:58:18 -0400 |
| commit | 57623886b25cd2104f326d5974ff8375ba4964f6 (patch) | |
| tree | 12bfd28418705126bbdc045fc1707c2d80c86740 /MediaBrowser.Server.Implementations/Session/WebSocketController.cs | |
| parent | 1dafb46b71aef08e45f265e6c1070d0a9270a78f (diff) | |
added generic remote control commands
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session/WebSocketController.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Session/WebSocketController.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/WebSocketController.cs b/MediaBrowser.Server.Implementations/Session/WebSocketController.cs index 70d7ac071..ddf4ec2ca 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); + } } } |
