title: How to send response back to client using socket.io?
body: <p>I have <code>socket.emit</code> call from client to server in response i want to have filename to the client that is not happening with below code not sure what is implemented wrong any idea, I do not see any error. How can i get response fro server using <code>socket.emit</code> ?</p>
  <p>client.js</p>
  <pre><code> socket.emit('startRecording',function (response) {
              console.log('start recording emit response',response);
          });
  </code></pre>
  <p>server.js</p>
  <pre><code> socket.on('startRecording',function () {
          var response;
          logsRecording(function (filename) {
              response = filename;
              return response;
              //socket.emit('filename',filename);
          });
  </code></pre>