Skip to content

Commit

Permalink
!109 修改MQTT示例代码
Browse files Browse the repository at this point in the history
Merge pull request !109 from zabbey/master
  • Loading branch information
Dozingfiretruck authored and gitee-org committed Feb 16, 2023
2 parents 019c12d + 8350aa0 commit 5de6db1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/network/libemqtt/luat_lib_mqtt.c
Expand Up @@ -240,14 +240,14 @@ mqttc = mqtt.create(nil,"120.55.137.106", 1884)
-- 加密TCP链接,不验证服务器证书
mqttc = mqtt.create(nil,"120.55.137.106", 8883, true)
-- 加密TCPTCP链接,单服务器证书验证
mqttc = mqtt.create(nil,"120.55.137.106", 8883, {server_cert=io.readFile("/luadb/ca.crt"))
mqttc = mqtt.create(nil,"120.55.137.106", 8883, {server_cert=io.readFile("/luadb/ca.crt")})
-- 加密TCPTCP链接,双向证书验证
mqttc = mqtt.create(nil,"120.55.137.106", 8883, {
server_cert=io.readFile("/luadb/ca.crt"),
client_cert=io.readFile("/luadb/client.pem"),
client_key="123456",
client_password="123456",
)
})
*/
static int l_mqtt_create(lua_State *L) {
int ret = 0;
Expand Down

0 comments on commit 5de6db1

Please sign in to comment.