I'm trying to learn C#.
I am working on a script with MQTT. I am using the M2Mqtt library. If I use a while loop in my script, for example while (i < 10), it works just fine. but when I want to create an endless loop I get the following message.
WARNING: Using default timeout value 5000.
WARNING: Using default retries value 0.
I searched for this and found that a timeout and retry must be set. because this is the standard.
But I can't figure out how to do this.
I have tried this, among other things, but I get the next error 'MqttClient' does not contain a constuctor that takes 3 arguments.
int timeoutMilliseconds = 10000; // 10 seconden time-out
int retries = 3; // 3 herhalingen
MqttClient client = new MqttClient(brokerAddress, timeoutMilliseconds, retries);
can anyone help me out
I am working on a script with MQTT. I am using the M2Mqtt library. If I use a while loop in my script, for example while (i < 10), it works just fine. but when I want to create an endless loop I get the following message.
WARNING: Using default timeout value 5000.
WARNING: Using default retries value 0.
I searched for this and found that a timeout and retry must be set. because this is the standard.
But I can't figure out how to do this.
I have tried this, among other things, but I get the next error 'MqttClient' does not contain a constuctor that takes 3 arguments.
int timeoutMilliseconds = 10000; // 10 seconden time-out
int retries = 3; // 3 herhalingen
MqttClient client = new MqttClient(brokerAddress, timeoutMilliseconds, retries);
can anyone help me out