Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

96
Visualizações
Is there any way to pass both arguments and acknowledgment callback to serverSideEmit in Socket.IO?

In socket.io@4.1.0 we can emit serverSide events to other Socket.io servers.

But i want to send some arguments and get response of other server using this utility function. how can i do it?

when i pass arguments:

// server A
io.serverSideEmit("hello", "world", "foo", "bar");
// server B
io.on("hello", (worldArgument, fooArgument, barArgument) => false);

When I want to acknowledge the response:

// server A
io.serverSideEmit("ping", (err, responses) => verify = responses[0] === "pong");
// server B
io.on("ping", (cb) => cb("pong"));

but i want to use them together, is there any way to do this?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda