CloseStatusCodeHybi10.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace SuperWebSocket.Protocol
  6. {
  7. /// <summary>
  8. /// Close status code for Hybi10
  9. /// </summary>
  10. public class CloseStatusCodeHybi10 : ICloseStatusCode
  11. {
  12. /// <summary>
  13. /// Initializes a new instance of the <see cref="CloseStatusCodeHybi10"/> class.
  14. /// </summary>
  15. public CloseStatusCodeHybi10()
  16. {
  17. NormalClosure = 1000;
  18. GoingAway = 1001;
  19. ProtocolError = 1002;
  20. NotAcceptableData = 1003;
  21. TooLargeFrame = 1004;
  22. InvalidUTF8 = 1007;
  23. ViolatePolicy = 1000;
  24. ExtensionNotMatch = 1000;
  25. UnexpectedCondition = 1000;
  26. TLSHandshakeFailure = 1000;
  27. NoStatusCode = 1005;
  28. }
  29. /// <summary>
  30. /// Gets the code for normal closure.
  31. /// </summary>
  32. public int NormalClosure { get; private set; }
  33. /// <summary>
  34. /// Gets the code for going away.
  35. /// </summary>
  36. public int GoingAway { get; private set; }
  37. /// <summary>
  38. /// Gets the code for protocol error.
  39. /// </summary>
  40. public int ProtocolError { get; private set; }
  41. /// <summary>
  42. /// Gets the code for not acceptable data.
  43. /// </summary>
  44. public int NotAcceptableData { get; private set; }
  45. /// <summary>
  46. /// Gets the code for too large frame.
  47. /// </summary>
  48. public int TooLargeFrame { get; private set; }
  49. /// <summary>
  50. /// Gets the code for invalid UT f8.
  51. /// </summary>
  52. public int InvalidUTF8 { get; private set; }
  53. /// <summary>
  54. /// Gets the code for violate policy.
  55. /// </summary>
  56. public int ViolatePolicy { get; private set; }
  57. /// <summary>
  58. /// Gets the code for extension not match.
  59. /// </summary>
  60. public int ExtensionNotMatch { get; private set; }
  61. /// <summary>
  62. /// Gets the code for unexpected condition.
  63. /// </summary>
  64. public int UnexpectedCondition { get; private set; }
  65. /// <summary>
  66. /// Gets the code for TLS handshake failure.
  67. /// </summary>
  68. public int TLSHandshakeFailure { get; private set; }
  69. /// <summary>
  70. /// Gets the code for no status code.
  71. /// </summary>
  72. public int NoStatusCode { get; private set; }
  73. }
  74. }