#include "RDTCommon.h"
Typedefs | |
typedef void(__stdcall * | rdtClientAuthCb )(char *cszAccount, uint32_t nAccountMaxLength, char *cszPassword, uint32_t nPasswordMaxLength, const void *pArg) |
Functions | |
int32_t | RDT_Client_Create (int32_t nIOTCSessionID, uint8_t nIOTCChannelID, rdtClientAuthCb pfxClientAuthFn, const void *pArg, int32_t nTimeoutMs) |
Create a RDT client. | |
This file describes RDT module APIs for client.
typedef void(__stdcall * rdtClientAuthCb)(char *cszAccount, uint32_t nAccountMaxLength, char *cszPassword, uint32_t nPasswordMaxLength, const void *pArg) |
The prototype of authenticating connect informations, used by a RDT agent to be notified when connection start.
cszAccount | [out] The account input by user |
nAccountMaxLength | [in] Max size of cszAccount |
cszPassword | [out] The password input by user |
nPasswordMaxLength | [in] Max size of cszPassword |
pArg | [in] RDT agent pass user data |
int32_t RDT_Client_Create | ( | int32_t | nIOTCSessionID, |
uint8_t | nIOTCChannelID, | ||
rdtClientAuthCb | pfxClientAuthFn, | ||
const void * | pArg, | ||
int32_t | nTimeoutMs | ||
) |
Create a RDT client.
This function will create a RDT client based on specified IOTC channel with DTLS
nIOTCSessionID | [in] The session ID of the IOTC session to create RDT channel |
nIOTCChannelID | [in] The channel ID of the IOTC channel to create RDT channel |
pfxClientAuthFn | [in] The function pointer of authenticate account function if IOTC session is crate by Nebula, this param can be NULL. |
pArg | [in] User can give data pointer to pass to pfxClientAuthFn when this call back function is triggered. Can be NULL. |
nTimeoutMs | [in] The timeout for this function in unit of million-second. Specify it as 0 will make this function block forever until a RDT channel is successfully created or error happens |