Skip to content
Start free evaluation

pdcomm_opcua_client_close

Function

Closes the session and the secure channel in an orderly way.

int32_t pdcomm_opcua_client_close(pdcomm_opcua_handle client)

Declared in: #include <pdcomm/opcua/pdcomm_opcua.h>

Sends CloseSession (deleting subscriptions) and CloseSecureChannel. Take every outstanding response first. Afterwards the client is closed, even when this call fails, and other calls return #PDCOMM_OPCUA_CLOSED. The handle must still be released.

Parameters

NameDescription
clientClient handle.

Returns

#PDCOMM_OPCUA_OK, #PDCOMM_OPCUA_BUSY while requests are outstanding or a response is held (the client stays open), #PDCOMM_OPCUA_RUNTIME_ERROR, #PDCOMM_OPCUA_CLOSED, #PDCOMM_OPCUA_INVALID_HANDLE or #PDCOMM_OPCUA_POISONED.

Notes

  • Blocks for up to timeout_ms per exchange.