C# Class NetworkCommsDotNet.DPSBase.DataPadder

Inheritance: DataProcessor
Afficher le fichier Open project: MarcFletcher/NetworkComms.Net

Méthodes publiques

Méthode Description
AddPaddingOptions ( string>.Dictionary options, int paddedSize, DataPaddingType paddingType = DataPaddingType.Zero, bool throwExceptionOnNotEnoughPadding = true ) : void

Adds the necessary options for padding

ForwardProcessDataStream ( Stream inStream, Stream outStream, string>.Dictionary options, long &writtenBytes ) : void
ReverseProcessDataStream ( Stream inStream, Stream outStream, string>.Dictionary options, long &writtenBytes ) : void

Private Methods

Méthode Description
DataPadder ( ) : System

Method Details

AddPaddingOptions() public static méthode

Adds the necessary options for padding
public static AddPaddingOptions ( string>.Dictionary options, int paddedSize, DataPaddingType paddingType = DataPaddingType.Zero, bool throwExceptionOnNotEnoughPadding = true ) : void
options string>.Dictionary The Dictionary to add the options to
paddedSize int 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 DataPaddingType Determines whether the data is padded with zeros or random data
throwExceptionOnNotEnoughPadding bool If true an is thrown if paddingSize is smaller than the original data packet size plus four bytes
Résultat void

ForwardProcessDataStream() public méthode

public ForwardProcessDataStream ( Stream inStream, Stream outStream, string>.Dictionary options, long &writtenBytes ) : void
inStream Stream
outStream Stream
options string>.Dictionary
writtenBytes long
Résultat void

ReverseProcessDataStream() public méthode

public ReverseProcessDataStream ( Stream inStream, Stream outStream, string>.Dictionary options, long &writtenBytes ) : void
inStream Stream
outStream Stream
options string>.Dictionary
writtenBytes long
Résultat void