socket.io client to client messaging

前端 未结 3 834
花落未央
花落未央 2021-01-15 08:22

I\'m having trouble getting basic client to client (or really client->server->client) working with socket.io. Heres the code I have right now:

io.sockets.on(         


        
3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-15 08:58

    You can now also use ...

    io.to('room').emit('event_name', data);
    

    as an alternative to io.sockets.in

提交回复
热议问题