示例#1
0
 protected void TestError()
 {
     if (ArrayTool.EqualsArrays(m_werr, m_buf4))
     {
         ReadVersion();
         throw new DatabaseError(ReadString());
     }
 }
示例#2
0
 protected void ReadHeader(string data)
 {
     byte[] b = Encoding.ASCII.GetBytes(data);
     ReadBuffer4();
     TestError();
     if (!ArrayTool.EqualsArrays(m_buf4, b))
     {
         Logging.Error("Bad content of PHP Tunnel:" + Encoding.ASCII.GetString(IOTool.ReadToEnd(m_fr)));
         throw new StreamFormatError(String.Format("Invalid PHP - Tunnel format, expected {0}, found {1}", data, Encoding.ASCII.GetString(m_buf4)));
     }
 }
示例#3
0
 protected bool IsInBuffer4(string cmp)
 {
     return(ArrayTool.EqualsArrays(m_buf4, Encoding.ASCII.GetBytes(cmp)));
 }