1.1.18.8.6 WDRV_WINC_MQTTConnect
C
WDRV_WINC_STATUS WDRV_WINC_MQTTConnect
(
DRV_HANDLE handle,
bool cleanSession,
uint16_t keepAliveTime,
WDRV_WINC_MQTT_PROTO_VER protocolVer,
const WDRV_WINC_MQTT_CONN_PROP *const pConnProp,
WDRV_WINC_MQTT_CONN_STATUS_CALLBACK pfConnCb,
uintptr_t connCbCtx
)Description
Starts a connection to an MQTT broker.
Precondition
WDRV_WINC_Initialize must have been called.
WDRV_WINC_Open must have been called to obtain a valid handle.
Parameters
| Parameters | Description |
|---|---|
| handle | Client handle obtained by a call to WDRV_WINC_Open. |
| cleanSession | Flag indicating if a clean session should be used. |
| keepAliveTime | Keep alive time (in seconds). |
| protocolVer | Protocol version. |
| pConnProp | Pointer to optional connection properties structure. |
| pfConnCb | Pointer to connection status callback. |
| connCbCtx | User context to pass to callback when called. |
Returns
WDRV_WINC_STATUS_OK - A connect request was sent.
WDRV_WINC_STATUS_NOT_OPEN - The driver instance is not open.
WDRV_WINC_STATUS_REQUEST_ERROR - The request to the WINC was rejected.
WDRV_WINC_STATUS_INVALID_ARG - The parameters were incorrect.
Remarks
None.
