예제 #1
0
        public override void pro(byte[] b, ref int off, int n)
        {
            int pre_off = off;           //上次偏移位置

            for (int i = 0; i < prot_list.Count; i++)
            {
                ProtDom pd = prot_dict[prot_list[i]]; //当前子协议域
                pd.pro(b, ref off, n);                //递归调用
                n      -= off - pre_off;              //增加了多少字节,总字节数相应减掉
                pre_off = off;
            }
        }
예제 #2
0
 public void pro(byte[] b, int off, int n)       //处理二进制包,缓存,偏移,长度(off之后)
 {
     prot_root.pro(b, ref off, n);
 }