9 Dec
2009
9 Dec
'09
9:18 p.m.
I found an example (below) but it seems to be pretty much the same as my current code to write to a character array and copy the buffer into the stream.
The advantage of asio::streambuf is that it has input and output areas, so you can perform i/o in a convenient manner. Look into examples/reference/tutorial for details.
It also looks like it might choke if the read was larger than 512 bytes.
It will not "choke", the completion handler will be called when it's full.