MQTT CONNECT PACKET max length?

hello Ravi Sir,
new_doubt

in ur code,if the data length is more than 128,then what will be the encoded byte(bytes)?
is it one byte or 2bytes? (Remaining Length field in MQTT Connect Format)

thanq,
Sankar

When length is more than 128 i think the remaining length field will be 2 bytes.

haa…thanq sir…

Sir what is the effect of KEEP ALIVE Timeperiod in MQTT?
i dont understand exatly…

if i’ll set that to 180seconds( 0x00B4 )…what happend?

Then broker will wait for 180 seconds even if you don’t send anything and close connection.