Boost logo

Boost Users :

Subject: Re: [Boost-users] How can I create a ip::tcp::iostream from a SOCKET descriptor?
From: Eric J. Holtman (eric_at_[hidden])
Date: 2009-12-21 12:11:24


Igor R wrote:
>
> 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
> _______________________________________________
>

Aha. Thanks.

I'll look into that. Looks like the asio may be overkill for
me (looking at buffers and such). My internal protocol
is pretty simple, though, so I might just fall back on using
serialization to dump stuff into binary string buffers and
then write that out to the socket directly, avoiding asio for now.


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