Boost Users :
Subject: Re: [Boost-users] [asio]: Having trouble getting started with ssl
From: Roland Bock (rbock_at_[hidden])
Date: 2008-12-29 05:58:50
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:
Igor R wrote:
>> sslTest.cpp:13: error: invalid initialization of reference of type
>> 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 list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net