Opcode.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. namespace SocketHttpListener
  2. {
  3. /// <summary>
  4. /// Contains the values of the opcode that indicates the type of a WebSocket frame.
  5. /// </summary>
  6. /// <remarks>
  7. /// The values of the opcode are defined in
  8. /// <see href="http://tools.ietf.org/html/rfc6455#section-5.2">Section 5.2</see> of RFC 6455.
  9. /// </remarks>
  10. public enum Opcode : byte
  11. {
  12. /// <summary>
  13. /// Equivalent to numeric value 0.
  14. /// Indicates a continuation frame.
  15. /// </summary>
  16. Cont = 0x0,
  17. /// <summary>
  18. /// Equivalent to numeric value 1.
  19. /// Indicates a text frame.
  20. /// </summary>
  21. Text = 0x1,
  22. /// <summary>
  23. /// Equivalent to numeric value 2.
  24. /// Indicates a binary frame.
  25. /// </summary>
  26. Binary = 0x2,
  27. /// <summary>
  28. /// Equivalent to numeric value 8.
  29. /// Indicates a connection close frame.
  30. /// </summary>
  31. Close = 0x8,
  32. /// <summary>
  33. /// Equivalent to numeric value 9.
  34. /// Indicates a ping frame.
  35. /// </summary>
  36. Ping = 0x9,
  37. /// <summary>
  38. /// Equivalent to numeric value 10.
  39. /// Indicates a pong frame.
  40. /// </summary>
  41. Pong = 0xa
  42. }
  43. }