On 18 Mar, 07:42, "Jim Langston" <tazmas...@rocketmail.com> wrote:
> <williamcorre...@gmail.com> wrote in message
>
> news: ups.com...
>
> > hi, I`m doing an application where I use sockets to connect two
> > differentes machines, but I don`t know how to create the buffers to
> > receive and to send data
>
> It all depends on what you plan on doing with the buffer. If you plan on
> filling it, then passing it to something else, a std::string should be fine.
> If you need to buffer messages by some code or something, maybe a
> std::vector<std::string>.
There is also std::queue, and std::streambuf, the first can be used
direct as a fifo container or as an interface example for say a fixed
size buffer using an array. The second may provide a base class for
the interface for a buffer.
I think Boost.Asio covers this sort of ground, so may be worth
investigating too:
http://tinyurl.com/yq3cc2
That said I have never had much dealings with any of the above...
regards
Andy Little