コード例 #1
0
ファイル: Decoder.cs プロジェクト: arsoftcr/AppleAPNsServer
 private void IndexHeader(int index, AddHeaderDelegate addHeaderDelegate)
 {
     if (index <= StaticTable.Length)
     {
         HeaderField headerField = StaticTable.GetEntry(index);
         this.AddHeader(addHeaderDelegate, headerField.Name, headerField.Value, false);
     }
     else if (index - StaticTable.Length <= this.dynamicTable.Length())
     {
         HeaderField headerField = this.dynamicTable.GetEntry(index - StaticTable.Length);
         this.AddHeader(addHeaderDelegate, headerField.Name, headerField.Value, false);
     }
     else
     {
         throw new IOException("illegal index value (" + index + ")");
     }
 }
コード例 #2
0
ファイル: Decoder.cs プロジェクト: arsoftcr/AppleAPNsServer
 private void ReadName(int index)
 {
     if (index <= StaticTable.Length)
     {
         HeaderField headerField = StaticTable.GetEntry(index);
         name = headerField.Name;
     }
     else if (index - StaticTable.Length <= this.dynamicTable.Length())
     {
         HeaderField headerField = this.dynamicTable.GetEntry(index - StaticTable.Length);
         name = headerField.Name;
     }
     else
     {
         throw new IOException("illegal index value (" + index + ")");
     }
 }