Add note to mqtt:subscribe

Fixes #2039
This commit is contained in:
Marcel Stör 2017-08-22 22:05:24 +02:00
parent 569628789c
commit 003c2453c3
1 changed files with 4 additions and 0 deletions

View File

@ -221,6 +221,10 @@ m:subscribe("/topic",0, function(conn) print("subscribe success") end)
m:subscribe({["topic/0"]=0,["topic/1"]=1,topic2=2}, function(conn) print("subscribe success") end) m:subscribe({["topic/0"]=0,["topic/1"]=1,topic2=2}, function(conn) print("subscribe success") end)
``` ```
!!! caution
Rather than calling `subscribe` multiple times you should use the multiple topics syntax shown in the above example if you want to subscribe to more than one topic at once.
## mqtt.client:unsubscribe() ## mqtt.client:unsubscribe()
Unsubscribes from one or several topics. Unsubscribes from one or several topics.