PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
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
// Déclaration de la connexion MQTT
gMqttSession is mqttSession
 
// Récupère les données saisies dans la fenêtre de connexion
gMqttSession.Address = SAI_Adresse_Broker
gMqttSession.Port = SAI_Port
gMqttSession.Option = INT_SSL
gMqttSession.ConnectionTimeout = SAI_Timeout_Connexion
gMqttSession.User = SAI_Login
gMqttSession.UserPassword = SAI_PSW
gMqttSession.PrivateKey = SAI_Clé_Privée
gMqttSession.PrivateKeyPassword = SAI_PSW_Clé_Privée
gMqttSession.ClientID = SAI_IDClient
gMqttSession.CleanSession = INT_Session_Vierge
IF MQTTConnect(gMqttSession) THEN
Message("Connexion OK")
ELSE
Error("Problème de connexion. '" + ErrorInfo() + "')")
END
Syntax
<Result> = MQTTConnect(<MQTT session>)
<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: wd270com.dll
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment