|
Boost Users : |
Subject: Re: [Boost-users] Use of socket
From: Igor R (boost.lists_at_[hidden])
Date: 2009-01-24 14:19:37
2009/1/23 Johan Mazel <johan.mazel_at_[hidden]>
> Thanks a lot for the fast answer.
>
> I have another question about the boost::mutable_buffer since they are used
> to send and receive payload through the upd socket with the methods send_to
> and receive_from.
> I'd like to know how can I assign the content of a mutable_buffer to a char
> * ?
> I found the method buffer_cast (
> http://www.boost.org/doc/libs/1_37_0/doc/html/boost_asio/reference/mutable_buffer/buffer_cast.html)
> but I don't really understand how to use it.
>
>
You can use it just as described here:
http://www.boost.org/doc/libs/1_37_0/doc/html/boost_asio/reference/buffer.html
But in most cases you don't need this function, as you've got more safe ways
to get the data (please refer to the asio tutorial and examples).
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