Mqtt Toolkit - @octave_mqtt/peek
- :
msg =peek(obj) - :
msg =peek(obj, topic) Return the most recent message without removing it from the message queue.
Inputs
objA previously created octave_mqtt object
topicTopic value to match.
Outputs
msgThe most recent message.
If no topic is specified, the last message from any topic will be returned, otherwise the last matching the input topic.
Examples
client = mqttclient("tcp://127.0.0.1"); msg = peek(client);