pdcomm_tcp_state
Function
Reads the endpoint identity, generation, HSMS state, and close status.
PdcommStatus pdcomm_tcp_state(PdcommTcpEndpoint *endpoint, PdcommTcpState *state)This call works while an event is staged.
Parameters
| Name | Description |
|---|---|
endpoint | Live endpoint. |
state | Caller storage. Set state->struct_size to sizeof(PdcommTcpState) or larger before the call; on success the known fields are written and struct_size is set to the size written. Trailing bytes of a larger structure are not touched. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when endpoint or state is NULL or state->struct_size is too small (nothing is written); #PDCOMM_POISONED.