WebSocketMessage.cs 676 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Text.Json.Serialization;
  3. using MediaBrowser.Model.Session;
  4. namespace MediaBrowser.Controller.Net;
  5. /// <summary>
  6. /// Websocket message without data.
  7. /// </summary>
  8. public abstract class WebSocketMessage
  9. {
  10. /// <summary>
  11. /// Gets or sets the type of the message.
  12. /// TODO make this abstract and get only.
  13. /// </summary>
  14. public virtual SessionMessageType MessageType { get; set; }
  15. /// <summary>
  16. /// Gets or sets the message id.
  17. /// </summary>
  18. public Guid MessageId { get; set; }
  19. /// <summary>
  20. /// Gets or sets the server id.
  21. /// </summary>
  22. [JsonIgnore]
  23. public string? ServerId { get; set; }
  24. }