StreamTools Write Method (Stream, Int64, Int64, Stream, Int32, Double, Int32)NetworkComms.Net Help
Write the provided input stream to the destination stream in chunks of writeBufferSize. Throws exception if any write takes longer than timeoutPerByteWriteMS.

Namespace: NetworkCommsDotNet.Tools
Assembly: NetworkCommsDotNet (in NetworkCommsDotNet.dll) Version: 3.0.0.0 (3.0.0.0)
Syntax

public static double Write(
	Stream inputStream,
	long inputStart,
	long inputLength,
	Stream destinationStream,
	int writeBufferSize,
	double timeoutMSPerKBWrite,
	int minTimeoutMS
)

Parameters

inputStream
Type: OnlineSystem.IO Stream
Input stream containing data to send
inputStart
Type: OnlineSystem Int64
The start position in inputStream
inputLength
Type: OnlineSystem Int64
The number of bytes to write
destinationStream
Type: OnlineSystem.IO Stream
The destination stream
writeBufferSize
Type: OnlineSystem Int32
The size in bytes of each successive write, recommended 8K
timeoutMSPerKBWrite
Type: OnlineSystem Double
The maximum time to allow for write to complete per KB
minTimeoutMS
Type: OnlineSystem Int32
The minimum time to wait per write, this takes priority over other values.

Return Value

Type: OnlineDouble
The average time in milliseconds per KB written
See Also