StreamTools ThreadSafeStream CopyTo Method (Stream, Int64, Int64, Int32, Double, Int32)NetworkComms.Net Help
Copies data specified by start and length properties from internal stream to the provided stream.

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

public double CopyTo(
	Stream destinationStream,
	long startPosition,
	long length,
	int writeBufferSize,
	double timeoutMSPerKBWrite = 1000,
	int minTimeoutMS = 500
)

Parameters

destinationStream
Type: OnlineSystem.IO Stream
The destination stream to write to
startPosition
Type: OnlineSystem Int64

[Missing <param name="startPosition"/> documentation for "M:NetworkCommsDotNet.Tools.StreamTools.ThreadSafeStream.CopyTo(System.IO.Stream,System.Int64,System.Int64,System.Int32,System.Double,System.Int32)"]

length
Type: OnlineSystem Int64

[Missing <param name="length"/> documentation for "M:NetworkCommsDotNet.Tools.StreamTools.ThreadSafeStream.CopyTo(System.IO.Stream,System.Int64,System.Int64,System.Int32,System.Double,System.Int32)"]

writeBufferSize
Type: OnlineSystem Int32
The buffer size to use for copying stream contents
timeoutMSPerKBWrite (Optional)
Type: OnlineSystem Double
The timouts in milliseconds per KB to write
minTimeoutMS (Optional)
Type: OnlineSystem Int32
The minimum time allowed for any sized copy

Return Value

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