Socket io broadcast problem

now there are user a, user b, user c
the function that a wants to do is to notify b c online, but now only a has received the message

the code is shown in the following figure:

server:

:

what is the problem?

Mar.21,2021

because you have been operating socket of a , you need to save socket of bcode , and when a goes online through the socket of bhand c to notify bhand c .

Menu