WebSocketState.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. namespace XGame.Framework.Network.Web
  2. {
  3. /// <summary>
  4. /// Reference html5 WebSocket ReadyState Properties
  5. /// Indicates the state of a WebSocket connection.
  6. /// </summary>
  7. /// <remarks>
  8. /// The values of this enumeration are defined in
  9. /// <see href="http://www.w3.org/TR/websockets/#dom-websocket-readystate">
  10. /// The WebSocket API</see>.
  11. /// </remarks>
  12. public enum WebSocketState : ushort
  13. {
  14. /// <summary>
  15. /// Equivalent to numeric value 0. Indicates that the connection has not
  16. /// yet been established.
  17. /// </summary>
  18. Connecting = 0,
  19. /// <summary>
  20. /// Equivalent to numeric value 1. Indicates that the connection has
  21. /// been established, and the communication is possible.
  22. /// </summary>
  23. Open = 1,
  24. /// <summary>
  25. /// Equivalent to numeric value 2. Indicates that the connection is
  26. /// going through the closing handshake, or the close method has
  27. /// been invoked.
  28. /// </summary>
  29. Closing = 2,
  30. /// <summary>
  31. /// Equivalent to numeric value 3. Indicates that the connection has
  32. /// been closed or could not be established.
  33. /// </summary>
  34. Closed = 3
  35. }
  36. }