How to assign an already connected native socket type (TCP) in Boost.ASIO

view story

http://stackoverflow.com – Is there a way that allows using an already connected socket in ASIO? Trying to send one request; ip::tcp::socket::assign gives randomly 2 different segfaults at 2 different places. One is before calling the callback (on op_queue_acess::next) and other is after the callback (on boost::asio::detail::task_io_service_operation::complete (func_ is equal to 0 and tries to be executed)). So I guess it does not work with connected sockets. Edit: The case is, I have a connected native descriptor (actually a socket underlying under another library) and I want to assign it to a new, empty ip::tcp::so (HowTos)