C# Class hpack.DynamicTable

Exibir arquivo Open project: ringostarr80/hpack Class Usage Examples

Public Methods

Method Description
Add ( HeaderField header ) : void

Add the header field to the dynamic table. Entries are evicted from the dynamic table until the size of the table and the new header field is less than or equal to the table's capacity. If the size of the new entry is larger than the table's capacity, the dynamic table will be cleared.

Clear ( ) : void

Remove all entries from the dynamic table.

DynamicTable ( int initialCapacity ) : System

Creates a new dynamic table with the specified initial capacity.

GetCapacity ( ) : int

Return the maximum allowable size of the dynamic table.

GetEntry ( int index ) : HeaderField

Return the header field at the given index. The first and newest entry is always at index 1, and the oldest entry is at the index length().

GetSize ( ) : int

Return the current size of the dynamic table. This is the sum of the size of the entries.

Length ( ) : int

Return the number of header fields in the dynamic table.

Remove ( ) : HeaderField

Remove and return the oldest header field from the dynamic table.

SetCapacity ( int capacity ) : void

Set the maximum size of the dynamic table. Entries are evicted from the dynamic table until the size of the table is less than or equal to the maximum size.

Method Details

Add() public method

Add the header field to the dynamic table. Entries are evicted from the dynamic table until the size of the table and the new header field is less than or equal to the table's capacity. If the size of the new entry is larger than the table's capacity, the dynamic table will be cleared.
public Add ( HeaderField header ) : void
header HeaderField Header.
return void

Clear() public method

Remove all entries from the dynamic table.
public Clear ( ) : void
return void

DynamicTable() public method

Creates a new dynamic table with the specified initial capacity.
public DynamicTable ( int initialCapacity ) : System
initialCapacity int Initial capacity.
return System

GetCapacity() public method

Return the maximum allowable size of the dynamic table.
public GetCapacity ( ) : int
return int

GetEntry() public method

Return the header field at the given index. The first and newest entry is always at index 1, and the oldest entry is at the index length().
public GetEntry ( int index ) : HeaderField
index int Index.
return HeaderField

GetSize() public method

Return the current size of the dynamic table. This is the sum of the size of the entries.
public GetSize ( ) : int
return int

Length() public method

Return the number of header fields in the dynamic table.
public Length ( ) : int
return int

Remove() public method

Remove and return the oldest header field from the dynamic table.
public Remove ( ) : HeaderField
return HeaderField

SetCapacity() public method

Set the maximum size of the dynamic table. Entries are evicted from the dynamic table until the size of the table is less than or equal to the maximum size.
public SetCapacity ( int capacity ) : void
capacity int Capacity.
return void