Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

159
Vistas
Socketio specific client join room

I know that I can use

socket.join(room);

But it's not what I want. I want to choose specific client connected to server and make him join room. So it would looks like that:

OpEhq_0m7wzkZenVAAAB.join(room)

Where OpEhq_0m7wzkZenVAAAB is a single client.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

To make client join room you have to get clients object then you can join using that,to get that clients object you have to store clients object in array on connection like this,

var i;
io.on('connection', function(socket){
    array[i]=socket;
    i++;
}

afterwards if you want to make specific client join room you can do,

array[0].join(room);
array[1].join(room);

Hope it will help..!

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda