testReadWrite

Test interleaved write and read calls.

Generates a buffer totalSize bytes long, then writes it to the transport, and verifies the written data can be read back correctly.

Mode of operation: - call wChunkGenerator to figure out how large of a chunk to write - call wSizeGenerator to get the size for individual write() calls, and do this repeatedly until the entire chunk is written. - call rChunkGenerator to figure out how large of a chunk to read - call rSizeGenerator to get the size for individual read() calls, and do this repeatedly until the entire chunk is read. - repeat until the full buffer is written and read back, then compare the data read back against the original buffer

More...
void
testReadWrite
(
CoupledTransports
)
(
size_t totalSize
,
SizeGenerator wSizeGenerator
,
SizeGenerator rSizeGenerator
,
SizeGenerator wChunkGenerator
,
SizeGenerator rChunkGenerator
,
)
if (
isCoupledTransports!CoupledTransports
)

Detailed Description

- If any of the size generators return 0, this means to use the maximum possible size.

- If maxOutstanding is non-zero, write chunk sizes will be chosen such that there are never more than maxOutstanding bytes waiting to be read back.

Meta