title: Not able emit message after adding ssl over socket.io
body: <p>I had built an application using Node JS and socket.io. It was working fine. Since I had to move the application over a secure connection, I changed the code to support SSL.</p>
  
  <p>But, now I am unable to do a <code>socket.emit</code>. Neither server, nor the client is able to emit the messages.</p>
  
  <p>The connections are made successfully, but nothing gets emitted afterwards.</p>
  
  <p>Here is the code.</p>
  
  <p><strong>Server Side</strong></p>
  
  <pre><code>var fs = require( 'fs' );
  
  var options = {
         key:  fs.readFileSync('/etc/httpd/conf.d/ssl/*.xyz.in.key'),
         cert: fs.readFileSync('/etc/httpd/conf.d/ssl/xyz.in.crt'),
         requestCert:        true,
         rejectUnauthorized: false  // Tried both, with and without this line.
    };
  
  var io = require( 'socket.io' ).listen( 8888, options );
  
  io.sockets.on('connection', OnConnection );
  
  io.set("origins", "*:*"); // Tried with and without this line.
  
  // Called when a connection is made with a new Client.
  function OnConnection ( socket )
  {
      console.log( socket.id + " connected" ); // This line gets printed.
      socket.on('ev_SendMsgForApproval', OnMsgReceivedForModApproval );
  }
  
  function OnMsgReceivedForModApproval( data )
  {
       console.log( data ); //This does not get executed. :(
  }
  </code></pre>
  
  <p><strong>Client Side</strong></p>
  
  <pre><code>var socket = io.connect("https://xyz.com:8888", {secure : true} );
  
  // This message get called for sure.
  function OnMsgSendClick()
  {
      console.log( "Hi" );  // This gets printed on browser's console.
      socket.emit( 'ev_SendMsgForApproval', { chatMsg: "Hi" } );
      return false;
  }
  </code></pre>
  
  <p>I have also tried to do emit from server, but that data, does not reach the client either. In debug I am able to see that server has emitted something, but that does not reach the client.</p>
  
  <p>All this was working fine without the SSL. </p>
  
  <p>What could be the issue? Stuck with this from a long time. Please help.</p>