Boost logo

Boost Users :

Subject: Re: [Boost-users] ASIO sockets and stream buffers
From: Roland Bock (rbock_at_[hidden])
Date: 2009-02-05 05:01:56


Hi,

> I can't seem to find the right stream type that takes my existing
> socket. Does such a creature exist in the ASIO library?

This is what I do:

boost::asio::streambuf request;
std::ostream requestStream(&request);

requestStream << myMessage;

// Send the request.
boost::asio::write(socket, request);

Regards,

Roland


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