title: Make socket.io work within an API endpoint in Node.js
body: <p>I'm having the following logic (all servers are in Node.js) :</p>
  
  <p>1- Client makes an API call to Server A's "api/request" endpoint.</p>
  
  <p>2- Server A "request" endpoint receives the request, and just passes the original request to Server B with a socket.io emit event.</p>
  
  <p>3- Server B socket.io on event receives the request, handles it, and sends back the response in a new socket.io emit event.</p>
  
  <p>4- Server A socket.io on event receives the response, and is supposed to return the response to the Client who originally made the request.</p>
  
  <p>The issue is that since in Server A I'm passing the request with socket.io emit event, I'm loosing the option to wait for an answer from Server B to return to Client anything. I would like Client to receive the response from Server B, as a response from its original call to Server A.</p>
  
  <p>Any idea on how to achieve this?</p>