aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Net/WebSocketMessages/Shared/KeepAliveMessage.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Net/WebSocketMessages/Shared/KeepAliveMessage.cs')
-rw-r--r--MediaBrowser.Controller/Net/WebSocketMessages/Shared/KeepAliveMessage.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Net/WebSocketMessages/Shared/KeepAliveMessage.cs b/MediaBrowser.Controller/Net/WebSocketMessages/Shared/KeepAliveMessage.cs
new file mode 100644
index 000000000..7f636212c
--- /dev/null
+++ b/MediaBrowser.Controller/Net/WebSocketMessages/Shared/KeepAliveMessage.cs
@@ -0,0 +1,23 @@
+using System.ComponentModel;
+using MediaBrowser.Model.Session;
+
+namespace MediaBrowser.Controller.Net.WebSocketMessages.Shared;
+
+/// <summary>
+/// Keep alive websocket messages.
+/// </summary>
+public class KeepAliveMessage : WebSocketMessage<int>, IInboundWebSocketMessage, IOutboundWebSocketMessage
+{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="KeepAliveMessage"/> class.
+ /// </summary>
+ /// <param name="data">The seconds to keep alive for.</param>
+ public KeepAliveMessage(int data)
+ : base(data)
+ {
+ }
+
+ /// <inheritdoc />
+ [DefaultValue(SessionMessageType.KeepAlive)]
+ public override SessionMessageType MessageType => SessionMessageType.KeepAlive;
+}