Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
003c2453
Commit
003c2453
authored
Aug 22, 2017
by
Marcel Stör
Browse files
Add note to mqtt:subscribe
Fixes #2039
parent
56962878
Changes
1
Show whitespace changes
Inline
Side-by-side
docs/en/modules/mqtt.md
View file @
003c2453
...
@@ -221,6 +221,10 @@ m:subscribe("/topic",0, function(conn) print("subscribe success") end)
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment