title: Simple client/server, TCP/IP encrypting the message stream, SSL (C++)
body: <p>Basically my question is the exact same one as this:</p>
  
  <p><a href="https://stackoverflow.com/questions/937459/simple-client-server-tcp-ip-encrypting-the-message-stream-ssl">Simple client/server, TCP/IP encrypting the message stream, SSL</a></p>
  
  <p>The difference is that I need this for pure C++, not .NET.  I cannot use 3rd party libraries, so unless it's a Windows system component (like the above) I need something with source so I can get the generel idea and build it myself.</p>
  
  <p>Thanks :)</p>
  
  <p>Quoting the other question for reference:</p>
  
  <blockquote>
    <p>"Writing a little TCP/IP client server
    app. Basically it creates a server,
    and then you can create several
    different clients and set up a bit of
    a chat session. What I am wondering is
    there is any way to incorporate, using
    standard .net libraries some form of
    encryption?</p>
    
    <p>m_mainSocket = new
    Socket(AddressFamily.InterNetwork,
    SocketType.Stream, ProtocolType.Tcp);</p>
    
    <p>Is there any way of speficying tcp
    using rsa?</p>
    
    <p>Or would you (me that is) have to
    write some custom libaries to do key
    exchange and then encrypt the
    subsequent chat messages? I have done
    that before for uni but that was in
    java but I know it would'nt be hard to
    convert them. Just trying not to have
    to reinvent the wheel...</p>
    
    <p>Or what about utilising a ssl?</p>
    
    <p>Thanks, Ron."</p>
  </blockquote>