C# Class hpack.Decoder

Exibir arquivo Open project: ringostarr80/hpack

Public Methods

Method Description
Decode ( BinaryReader input, IHeaderListener headerListener ) : void

Decode the header block into header fields.

Decoder ( int maxHeaderSize, int maxHeaderTableSize ) : System

Initializes a new instance of the hpack.Decoder class.

EndHeaderBlock ( ) : bool

End the current header block. Returns if the header field has been truncated. This must be called after the header block has been completely decoded.

GetMaxHeaderTableSize ( ) : int

Return the maximum table size. This is the maximum size allowed by both the encoder and the decoder.

SetMaxHeaderTableSize ( int maxHeaderTableSize ) : void

Set the maximum table size. If this is below the maximum size of the dynamic table used by the encoder, the beginning of the next header block MUST signal this change.

Private Methods

Method Description
AddHeader ( IHeaderListener headerListener, byte name, byte value, bool sensitive ) : void
DecodeULE128 ( BinaryReader input ) : int
ExceedsMaxHeaderSize ( long size ) : bool
GetHeaderField ( int index ) : HeaderField

Return the header field at the given index. Exposed for testing.

IndexHeader ( int index, IHeaderListener headerListener ) : void
InsertHeader ( IHeaderListener headerListener, byte name, byte value, HpackUtil indexType ) : void
Length ( ) : int

Return the number of header fields in the dynamic table. Exposed for testing.

ReadName ( int index ) : void
ReadStringLiteral ( BinaryReader input, int length ) : byte[]
Reset ( ) : void
SetDynamicTableSize ( int dynamicTableSize ) : void
Size ( ) : int

Return the size of the dynamic table. Exposed for testing.

Method Details

Decode() public method

Decode the header block into header fields.
public Decode ( BinaryReader input, IHeaderListener headerListener ) : void
input System.IO.BinaryReader Input.
headerListener IHeaderListener Header listener.
return void

Decoder() public method

Initializes a new instance of the hpack.Decoder class.
public Decoder ( int maxHeaderSize, int maxHeaderTableSize ) : System
maxHeaderSize int Max header size.
maxHeaderTableSize int Max header table size.
return System

EndHeaderBlock() public method

End the current header block. Returns if the header field has been truncated. This must be called after the header block has been completely decoded.
public EndHeaderBlock ( ) : bool
return bool

GetMaxHeaderTableSize() public method

Return the maximum table size. This is the maximum size allowed by both the encoder and the decoder.
public GetMaxHeaderTableSize ( ) : int
return int

SetMaxHeaderTableSize() public method

Set the maximum table size. If this is below the maximum size of the dynamic table used by the encoder, the beginning of the next header block MUST signal this change.
public SetMaxHeaderTableSize ( int maxHeaderTableSize ) : void
maxHeaderTableSize int Max header table size.
return void