.state R/O Property

Function:

For the currently selected socket (selection is made through sock.num), returns the "detailed" current socket state.

Type:

Enum (pl_sock_state, byte)

Value Range:

  • 0 — PL_SST_CLOSED (default): Connection is closed (and haven't been opened yet, it is a post-powerup state). Applied both to UDP and TCP.
  • 1 — PL_SST_CL_PCLOSED: Connection is closed (it was a passive close). Applies only to TCP.
  • 2 — PL_SST_CL_ACLOSED: Connection is closed (it was an active close by the application). Applies only to TCP.
  • 3 — PL_SST_CL_PRESET_POPENING: Connection is closed (it was a passive reset during a passive open). Applies only to TCP.
  • 4 — PL_SST_CL_PRESET_AOPENING: Connection is closed (it was a passive reset during an active open). Applies only to TCP.
  • 5 — PL_SST_CL_PRESET_EST: Connection is closed (it was a passive reset while in "connection established" state). Applies only to TCP.
  • 6 — PL_SST_CL_PRESET_PCLOSING: Connection is closed (it was a passive reset while performing a passive close). Applies only to TCP.
  • 7 — PL_SST_CL_PRESET_ACLOSING: Connection is closed (it was a passive reset while performing an active close). Applies only to TCP.
  • 8 — PL_SST_CL_PRESET_STRANGE: Connection is closed (it was a passive reset, no further details available). Applies only to TCP.
  • 9 — PL_SST_CL_ARESET_CMD: Connection is closed (it was an active reset issued by the application). Applies only to TCP.
  • 10 — PL_SST_CL_ARESET_RE_PO: Connection is closed (it was an active reset issued because of excessive retransmission attempts during a passive open). Applies only to TCP.
  • 11 — PL_SST_CL_ARESET_RE_AO: Connection is closed (it was an active reset issued because of excessive retransmission attempts during an active open). Applies only to TCP.
  • 12 — PL_SST_CL_ARESET_RE_EST: Connection is closed (it was an active reset issued because of excessive retransmission attempts while in "connection established" state). Applies only to TCP.
  • 13 — PL_SST_CL_ARESET_RE_PCL: Connection is closed (it was an active reset issued because of excessive retransmission attempts during a passive close). Applies only to TCP.
  • 14 — PL_SST_CL_ARESET_RE_AC: Connection is closed (it was an active reset issued because of excessive retransmission attempts during a passive open). Applies only to TCP.
  • 15 — PL_SST_CL_ARESET_TOUT: Connection is closed (it was an active reset caused by connection timeout, i.e. no data was exchanged for sock.connectiontout number of seconds). Applies only to TCP.
  • 16 — PL_SST_CL_ARESET_DERR: Connection is closed (it was an active reset caused by a data exchange error). Applies only to TCP.
  • 17 — PL_SST_CL_DISCARDED_CMD: Connection is closed (it was discarded by the application). Applies both to UDP and TCP.
  • 18 — PL_SST_CL_DISCARDED_PO_WCS: Connection is closed (it was discarded because an error in connection sequence was detected during a passive open). Applies only to TCP.
  • 19 — PL_SST_CL_DISCARDED_AO_WCS: Connection is closed (it was discarded because an error in connection sequence was detected during an active open). Applies only to TCP.
  • 20 — PL_SST_CL_DISCARDED_ARPFL: Connection is closed (it was discarded because the device has failed to resolve the IP address of the destination during an active open, i.e. there was no reply to ARP requests). Applies both to UDP and TCP.
  • 21 — PL_SST_CL_DISCARDED_TOUT: Connection is closed (it was discarded because connection has timed out, i.e. no data was exchanged for sock.connectiontout number of seconds). Applies only to UDP.
  • 32 — PL_SST_ARP: ARP resolution is an progress (it is an active open). Applied both to UDP and TCP.
  • 64 — PL_SST_PO: Connection is being established (it is a passive open). Applies only to TCP.
  • 96 — PL_SST_AO: Connection is being established (it is an active open). Applies only to TCP.
  • 128 — PL_SST_EST: Connection is established (generic, includes both passive and active open). Applies both to UDP and TCP.  
  • 128 — PL_SST_EST_POPENED: Connection is established (it was a passive open). Applies both to UDP and TCP.
  • 129 — PL_SST_EST_AOPENED: Connection is established (it was an active open). Applies both to UDP and TCP.
  • 130 — PL_SST_EST_TLS: Connection is secured. Applies only to TCP.
  • 160 — PL_SST_PC: Connection is being closed (it is a passive close). Applies only to TCP.
  • 192 — PL_SST_AC: Connection is being closed (it is an active close). Applies only to TCP.

See Also:

---