pdcomm_gem_state
Function
Reads the current GEM state of an endpoint.
PdcommStatus pdcomm_gem_state(PdcommTcpEndpoint *endpoint, PdcommGemState *state)The call first applies pending HSMS SELECTED and generation changes, so the reported communication state is current.
Parameters
| Name | Description |
|---|---|
endpoint | Live TCP endpoint with a GEM role. |
state | Caller storage. Set state->struct_size to sizeof(PdcommGemState) or larger; on success every field is written and struct_size is set to the size written. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when endpoint or state is NULL or state->struct_size is too small; #PDCOMM_BACKPRESSURE when a staged TCP event must be retrieved first; #PDCOMM_INVALID_STATE when the endpoint has no GEM role; #PDCOMM_POISONED when the endpoint is poisoned.