Boost logo

Boost Users :

Subject: Re: [Boost-users] How can I create a ip::tcp::iostream from a SOCKET descriptor?
From: Igor R (boost.lists_at_[hidden])
Date: 2009-12-21 11:50:24


> I'm just stuck on finding that construction (or function)
> that will take an already opened SOCKET handle
> and wrap an iostream around it.

It seems that ip::tcp::iostream doesn't have such a capability. But
iostream is just a convenience wrapper. You can open a regular
ip::tcp::socket with this overload:
http://www.boost.org/doc/libs/1_41_0/doc/html/boost_asio/reference/basic_stream_socket/basic_stream_socket/overload4.html
and then use synchronous i/o operations with asio::streambuf


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