Skip to content
Start free evaluation

pdcomm_gem_configure_host

Function

Attaches a GEM host role to a stopped TCP endpoint.

PdcommStatus pdcomm_gem_configure_host(PdcommTcpEndpoint *endpoint, const PdcommGemHostOptions *options)

Declared in: #include <pdcomm_gem.h>

Parameters

NameDescription
endpointLive TCP endpoint in #PDCOMM_TCP_STOPPED without a GEM role.
optionsHost options; read during the call only.

Returns

#PDCOMM_OK when the role was attached; #PDCOMM_INVALID_ARGUMENT when endpoint or options is NULL, options->struct_size or options->item_limits.struct_size is too small, or options->version is not #PDCOMM_GEM_OPTIONS_VERSION; #PDCOMM_INVALID_STATE when the endpoint is not stopped or already has a GEM role; #PDCOMM_POISONED when the endpoint is poisoned.

Notes

  • Configure the role once, before pdcomm_tcp_start(). It stays attached until pdcomm_tcp_destroy().