copying over the ssl sockets from http://fizz.buzz/posts/openssl-sockets-in-c++-part-4.html