Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

92
Views
socket se unió a la sala pero no recibe eventos en la sala

El socket se une a una sala en la conexión, el nombre de la sala se puede encontrar en el conjunto de rooms definido en el propio socket , pero cuando se activa un evento en esa sala, no lo recibe. ¿Alguien puede resolver el problema con mi código?

Unión

 this.socketIOServer.on('connect', async (socket: AuthenticatedSocket) => { if (socket?.request?.user?.id) { await socket.join(socket.request.user.id); console.log(socket.rooms); // Set(2) { 'j462VueHBUxufBucAAAB', '62c16b98be39c3605f03fd5a' } } });

emitiendo

 console.log( 'Sockets', AppointmentsSocketService.server.sockets.sockets.forEach(s => { console.log(s.rooms); // Set(2) { 'j462VueHBUxufBucAAAB', '62c16b98be39c3605f03fd5a' } Found in output }), ); /* EMIT EVENT TO ROOM */ AppointmentsSocketService.server .to(appointment.patient.id) // id is exactly as room name '62c16b98be39c3605f03fd5a' .emit('appointments/status', appointment); console.log( 'Sockets', AppointmentsSocketService.server.sockets.sockets.forEach(s => { console.log(s.rooms); // Set(2) { 'j462VueHBUxufBucAAAB', '62c16b98be39c3605f03fd5a' } Found in output }), );

Estoy probando a través del cartero, y eso nunca recibe la respuesta. También intenté usar la aplicación Firecamp y escribí un script ficticio para probar, pero nunca recibí el evento.

Captura de pantalla del cartero

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!