DataPadder AddPaddingOptions Method NetworkComms.Net Help
Adds the necessary options for padding

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

public static void AddPaddingOptions(
	Dictionary<string, string> options,
	int paddedSize,
	DataPadder..::..DataPaddingType paddingType = DataPadder..::..DataPaddingType.Zero,
	bool throwExceptionOnNotEnoughPadding = true
)

Parameters

options
Type: OnlineSystem.Collections.Generic Dictionary OnlineString, OnlineString 
The Dictionary to add the options to
paddedSize
Type: OnlineSystem Int32
The size that the data section of the packet should be padded to. If throwExceptionOnNotEnoughPadding is true this must be at least the original data packet size plus four bytes
paddingType (Optional)
Type: NetworkCommsDotNet.DPSBase DataPadder DataPaddingType
Determines whether the data is padded with zeros or random data
throwExceptionOnNotEnoughPadding (Optional)
Type: OnlineSystem Boolean
If true an OnlineArgumentException is thrown if paddingSize is smaller than the original data packet size plus four bytes
See Also