Sending message to specific client with socket.io and empty message queue

后端 未结 9 2006
误落风尘
误落风尘 2020-12-22 20:16

I´m going crazy with socket.io! Documentation is so bad it\'s simply not true.

I want to send a feedback to specific client over socket.io

My server side loo

9条回答
  •  轮回少年
    2020-12-22 21:02

    First of all, you cannot use socket.id on client side.

    And then change the line

    var socket = io.connect('http://localhost:80/socket.io/socket.io.js');

    to

    var socket = io.connect('http://localhost:80/');

提交回复
热议问题