csdn_8888v
csdn_8888v
采纳率100%
2017-12-21 03:51 浏览 3.8k
已采纳

mosquitto及websocket的HTML客户端连接问题

80

服务器mosquitto 及 websocket 已经安装好了,
配置:config.mk WITH_WEBSOCKETS:=yes
配置:mosquitto.conf
35 pid_file /var/run/mosquitto.pid
43 user root
136 port 1883
144 max_connections -1
277 listener 36036
297 protocol websockets
513 allow_anonymous true

启动:mosquitto -c /etc/mosquitto/mosquitto.conf
1513821115: mosquitto version 1.4.11 (build date 2017-12-19 14:12:55+0800) starting
1513821115: Config loaded from /etc/mosquitto/mosquitto.conf.
1513821115: Opening websockets listen socket on port 36036.
1513821115: Opening ipv4 listen socket on port 1883.
1513821115: Error: Address already in use
mosquitto_sub mosquitto_pub 正常订阅和发布;

用下面HTML客户端测试:
http://blog.csdn.net/qq_28877125/article/details/78350479
http://blog.csdn.net/a358763471/article/details/44200401
http://blog.csdn.net/M348915654/article/details/53616837
都没有连上服务器;
帮我找找问题在哪

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

3条回答 默认 最新

  • 已采纳
    devmiao devmiao 2017-12-21 18:20
  • devmiao devmiao 2017-12-21 18:22
    点赞 评论 复制链接分享
  • csdn_8888v csdn_8888v 2017-12-27 00:37

    谢谢,服务器测试已经正常,是浏览器客户端连不上服务器

    点赞 评论 复制链接分享

相关推荐