C# Class TransportService.BufferChunk

Internal class to the TransportService assembly. This class represents a single element of a file streamed over the network. It consists in an array of byte (the part of the stream), a state representing the chunk condition and some other structures useful to make requests over a specific chunk to die and resurrect automatically.
Exibir arquivo Open project: zencoders/sambatyon

Public Methods

Method Description
BufferChunk ( ) : System

Default constructor of the class. It limits itself to only set the state of the chunk by default in CLEAN condition.

BufferChunk ( byte payload ) : System

Valorized constuctor of the class. It represents a chunk already downloaded because a payload is passed to the method. The condition of the chunk is automatically set to DOWNLOADED.

Private Methods

Method Description
cleaner ( object source, EventArgs e ) : void

Utility method used to clean the state of a chunk. It has the signature of an event method because it is passed to a timer class.

Method Details

BufferChunk() public method

Default constructor of the class. It limits itself to only set the state of the chunk by default in CLEAN condition.
public BufferChunk ( ) : System
return System

BufferChunk() public method

Valorized constuctor of the class. It represents a chunk already downloaded because a payload is passed to the method. The condition of the chunk is automatically set to DOWNLOADED.
public BufferChunk ( byte payload ) : System
payload byte The payload contained into the chunk.
return System