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

102
Views
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
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!