openHiTLS API openHiTLS 0.1.0-Alpha1

◆ HITLS_SetUio()

int32_t HITLS_SetUio ( HITLS_Ctx ctx,
BSL_UIO uio 
)

Set the UIO object for the HiTLS context.

Bind the HiTLS context to the UIO object, through which the TLS object sends data, reads data, and controls the connection status at the network layer. After successfully setting, the number of times the UIO object is referenced increases by 1. BSL_UIO_Free is called to release the association between the HiTLS and UIO when HITLS_Free is called.

Attention
After a HiTLS context is bound to a UIO object, the UIO object cannot be bound to other HiTLS contexts. This function must be called before HITLS_Connect and HITLS_Accept.
Parameters
ctx[OUT] TLS connection handle.
uio[IN] UIO object.
Return values
HITLS_SUCCESS,ifsuccessful.
Forother error codes, see hitls_error.h.