
Hi, I have a boost::asio::ip::tcp::socket variable (reference) in a class, and it is initialized at the object construction time. At a later time I need to assign a new socket to this "socket reference variable". I think boost::assign is meant for that. But when I use assign, get the following error... (or is there any other method available?) .....cannot convert parameter 2 from 'boost::asio::ip::tcp::socket' to 'const boost::asio::detail::win_iocp_socket_service<Protocol>::native_type &' The code snippet is as follows... class MyClass { .... ..... private: tcp::socket& Socket; } void MyClass::SetSocket(tcp::socket& s) { Socket.assign(boost::asio::ip::tcp::v4(),s); } What could be the reason? Thanks in advance, Lloyd