openHiTLS API openHiTLS 0.1.0-Alpha1

◆ HITLS_GetError()

int32_t HITLS_GetError ( const HITLS_Ctx ctx,
int32_t  ret 
)

Obtain the TLS operation error code.

参数
ctx[IN] TLS context
ret[IN] Return value of the TLS interface called
返回值
HITLS_SUCCESS,Noerror.
HITLS_WANT_CONNECT,indicatesthat the connection is blocked. You can call HITLS_Connect to continue the connection, This problem is usually caused by the read and write operation failure.
HITLS_WANT_ACCEPT,indicatesthat the connection is blocked and the HITLS_Accept can be called to continue the connection. This problem is usually caused by the read and write operation failure.
HITLS_WANT_READ,indicatesthat the receiving buffer is empty and the interface can be called to continue receiving data.
HITLS_WANT_WRITE,indicatesthat the sending buffer is full and the interface can be called to continue sending data.
HITLS_ERR_TLS,Anunrecoverable fatal error occurs in the TLS protocol, usually a protocol error.
HITLS_ERR_SYSCALL,Anunrecoverable I/O error occurs. Generally, the I/O error is caused by the Low level receiving and receiving exception and an unknown error occurs.