The TCP handling reads into an intermediate staging buffer. The
problem was that this buffer wasn't being emptied between multiple
reads, only after the last one. If the total amount of data
received was more than the staging buffer size, the code failed
attempting to write beyond the buffer end.
This fix empties the staging buffer after (more or less) every
read from the network.
IOFetch is a general upstream "fetch" class that should be able to
operate over TCP or UDP. Related changes have been made in the
associated classes. So far, only the unit tests for a UDP fetch
have been made (and passed).
Updated function names to match convention. Also added receiveComplete()
to prepare for the fact that a TCP receive may require multiple reads
before the complete message is read.
Admin tasks:
* Split out io_error.h from asiolink.h
* Made test files follow naming convention of main files
* More discriminatory includes in some files
* Updates tests/Makefile.am
Coding tasks:
* Add additional methods to io_socket.* and put in dummies in
{tcp,udp}_socket.h
* Incorporated basic IO Fetch code from Scott
and moved them out of internal. Changed the internal/ workaround (to prevent files outside of asiolink/ to indirectly include asio.hpp), the .cc files that include the relevant headers must include asio.hpp themselves (and this is checked in the headers)
Also moved coroutine out of internal.
Tests are still todo (which is why internal/ still exists)