Skip to content
Start free evaluation

pdcomm_gem_state

Function

Reads the current GEM state of an endpoint.

PdcommStatus pdcomm_gem_state(PdcommTcpEndpoint *endpoint, PdcommGemState *state)

Declared in: #include <pdcomm_gem.h>

The call first applies pending HSMS SELECTED and generation changes, so the reported communication state is current.

Parameters

NameDescription
endpointLive TCP endpoint with a GEM role.
stateCaller 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.