Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] PINGREQ from Eclipse Paho client ?

Hi,
I am experimenting with a client written in Paho.

Suppose, after connecting to the broker, I do a for loop for a billion times doing nothing. Let us say, the time taken for this loop is t1 and keepAlive has been set to t2. If t1 < t2, then do I specifically send out a PINGREQ after t2 seconds are over ? If t1 > t2, then the client would have sent out PINGREQ automatically ?

I am also facing this other peculiar issue. I wanted to change the keepAlive value and so, I used the following. At run time, I get a IllegalArgumentException ! What is wrong ?

MqttClient mc = new MqttClient(ipAddress, clientID) ;
MqttConnectOptions connOptions = new MqttConnectOptions();
connOptions.setKeepAliveInterval(5);
mc.connect(connOptions);

Nagesh

Back to the top