openHiTLS API openHiTLS 0.1.0-Alpha1

◆ HITLS_Write()

int32_t HITLS_Write ( HITLS_Ctx ctx,
const uint8_t *  data,
uint32_t  dataLen 
)

Write data.

Encrypts and packs data with the specified length dataLen into a single record and sends the record.

注意
The length of the data to be sent cannot exceed the maximum writable length, which can be obtained by calling HITLS_GetMaxWriteSize.
参数
ctx[IN] TLS context
data[IN] Data to be written
dataLen[IN] Length to be written
返回值
HITLS_SUCCESSis sent successfully.
HITLS_REC_NORMAL_RECV_BUF_EMPTY,recordIf the receiving buffer is NULL, the message can be sent again.
HITLS_REC_NORMAL_IO_BUSY,Thenetwork I/O is busy and needs to wait for the next sending. You can continue sending the I/O.
Forother error codes, see hitls_error.h.