ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / MQTT functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Used to connect to a MQTT server (also called "Broker").
Example
// Declare the MQTT connection
gMqttSession is mqttSession
 
// Retrieve the data typed in the connection window
gMqttSession.Address = EDT_Broker_Address
gMqttSession.Port = EDT_Port
gMqttSession.Option = CBOX_SSL
gMqttSession.ConnectionTimeout = EDT_Connection_Timeout
gMqttSession.User = EDT_Login
gMqttSession.UserPassword = EDT_PSW
gMqttSession.PrivateKey = EDT_Private_Key
gMqttSession.PrivateKeyPassword = EDT_Private_Key_PSW
gMqttSession.ClientID = EDT_ClientID
gMqttSession.CleanSession = CBOX_Clean_Session
IF gMqttSession.Connect() THEN
Message("Connection OK")
ELSE
Error("Connection problem. '" + ErrorInfo() + "')")
END
Syntax
<Result> = <MQTT session>.Connect()
<Result>: Boolean
  • True if the connection was established,
  • False otherwise. ErrorInfo returns more details about the error.
<MQTT session>: mqttSession variable
Name of mqttSession variable corresponding to the connection parameters.
Business / UI classification: Business Logic
Component: wd290com.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/21/2023

Send a report | Local help