Prosody DTLS processing: API: sm_dtlsrx_get_packet

Prototype Definition

int sm_dtlsrx_get_packet(struct sm_dtlsrx_get_packet_parms *readp)

Parameters

*readp
a structure of the following type:
typedef struct sm_dtlsrx_get_packet_parms {
	tSMDTLSrxId dtlsrx;					/* in */
	char *data;						/* in */
	tSM_INT max_length;					/* in */
	tSM_INT packet_length;					/* out */
} SM_DTLSRX_GET_PACKET_PARMS;

Description

Attempt to read a packet from a DTLS[rx].

Requires the module dtlsrx to have been downloaded.

Fields

dtlsrx
The dtls[rx] from which to read a packet
data
A pointer to the buffer into which packet should be read.
max_length
The amount of space in the buffer.
packet_length
The length of the read packet.

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody DTLS processing API.