#include "RDTCommon.h"Typedefs | |
| typedef void(__stdcall * | rdtServerAuthCb )(const char *cszAccount, char *cszPassword, uint32_t nPasswordMaxLength, const void *pArg) |
Functions | |
| int32_t | RDT_Server_Create (int32_t nIOTCSessionID, uint8_t nIOTCChannelID, rdtServerAuthCb pfxServerAuthFn, const void *pArg, int32_t nTimeoutMs) |
| Create a RDT server. | |
This file describes RDT module APIs for server.
| typedef void(__stdcall * rdtServerAuthCb)(const char *cszAccount, char *cszPassword, uint32_t nPasswordMaxLength, const void *pArg) |
The prototype of authenticating connect informations, used by a RDT server to be notified when connection start.
| cszAccount | [in] Account from RDT agent |
| cszPassword | [out] The password input by user, set "" means authenticate fail |
| nPasswordMaxLength | [in] Max size of cszPassword |
| pArg | [in] RDT server pass user data |
| int32_t RDT_Server_Create | ( | int32_t | nIOTCSessionID, |
| uint8_t | nIOTCChannelID, | ||
| rdtServerAuthCb | pfxServerAuthFn, | ||
| const void * | pArg, | ||
| int32_t | nTimeoutMs | ||
| ) |
Create a RDT server.
This function will create a RDT server 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 |
| pfxServerAuthFn | [in] The function pointer of authenticate account function, if IOTC is login by Nebula, this param can be NULL. |
| pArg | [in] User can give data pointer to pass to pfxServerAuthFn 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 |