WebSocketConnectionState

public enum WebSocketConnectionState

Undocumented

  • Ready connections can send and receive data

    Declaration

    Swift

    case connected
  • Waiting connections have not yet been started, or do not have a viable network

    Declaration

    Swift

    case waiting
  • Cancelled connections have been invalidated by the client and will send no more events

    Declaration

    Swift

    case cancelled
  • Failed connections are disconnected and can no longer send or receive data

    Declaration

    Swift

    case failed(Error?)
  • Viability (connection status) of the connection has updated e.g. connection is down, connection came back up, etc.

    Declaration

    Swift

    case viability(Bool)
  • Connection ca be upgraded to wifi from cellular. You should consider reconnecting to take advantage of this.

    Declaration

    Swift

    case shouldReconnect(Bool)
  • Received data

    Declaration

    Swift

    case receive(Data)
  • Remote peer has closed the network connection.

    Declaration

    Swift

    case peerClosed