Decoder implementation
This commit is contained in:
parent
d4cdae8c6e
commit
ec0e0ec079
2 changed files with 56 additions and 7 deletions
SDBD.Codec
16
SDBD.Codec/HeaderListener.cs
Normal file
16
SDBD.Codec/HeaderListener.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
using System.Text;
|
||||
|
||||
internal class HeaderListener : hpack.IHeaderListener {
|
||||
public Dictionary<string, string> Headers { get; private set; }
|
||||
|
||||
public HeaderListener() {
|
||||
Headers = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
public void AddHeader(byte[] nameBytes, byte[] valueBytes, bool sensitive) {
|
||||
var name = Encoding.UTF8.GetString(nameBytes);
|
||||
var value = Encoding.UTF8.GetString(valueBytes);
|
||||
|
||||
Headers.Add(name, value);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue