title: Support both SSL and non-SSL on the same server port
body: <p>I've a plan to add the encryption to my server/client communication by using OpenSSL. But I want to let the user choose if they want to use the SSL channel to communicate or not. The easiest way is just create 2 socket and bind them to a different port, but I want the server to serve the service on only one port. </p>
  
  <p>Is there anyway to open the server side's SSL socket that support both SSL and non-SSL communication regarding the client incoming connection?</p>
  
  <p>P.S. I use OpenSSL lib for my c++ code.</p>