PlainFragment.cs 890 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using SuperSocket.Common;
  6. using SuperWebSocket.Protocol;
  7. namespace SuperWebSocket.Protocol
  8. {
  9. /// <summary>
  10. /// Plain text fragment
  11. /// </summary>
  12. class PlainFragment : IWebSocketFragment
  13. {
  14. /// <summary>
  15. /// Initializes a new instance of the <see cref="PlainFragment"/> class.
  16. /// </summary>
  17. /// <param name="message">The message.</param>
  18. public PlainFragment(string message)
  19. {
  20. Message = message;
  21. }
  22. /// <summary>
  23. /// Gets the message.
  24. /// </summary>
  25. public string Message { get; private set; }
  26. /// <summary>
  27. /// Gets the key of this request.
  28. /// </summary>
  29. public string Key
  30. {
  31. get { return OpCode.PlainTag; }
  32. }
  33. }
  34. }