
Igor, thanks for the information. I guess I should file a bug report about the documentation then since I did pretty much exactly what is written here: http://www.boost.org/doc/libs/1_37_0/doc/html/boost_asio/overview/ssl.html Regards, Roland Igor R wrote:
sslTest.cpp:13: error: invalid initialization of reference of type 'boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >&' from expression of type 'boost::asio::basic_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >'
The message is pretty clear, but I have no idea yet how to fix the problem.
<...>
ip::tcp::socket& sock = sslSock.lowest_layer();
lowest_layer() returns a reference to the base type of ip::tcp::socket. So you can either declare such a reference: ssl::stream::lowest_layer_type &sock = ....; ...or (if need some members specific to tcp::socket) static_cast to the desired type. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users