public override void ParsePacket(PacketParser parser) { var fieldInfos = _tableHeader.GetFields(); int columnCount = _tableHeader.ColumnCount; ParsePacketHeader(parser); parser.ParseFiller(1); //skip start packet byte [00] parser.ParseFiller((columnCount + 7 + 2) / 8); //skip null-bitmap, length:(column-count+7+2)/8 for (int i = 0; i < columnCount; i++) { ParseValues(parser, fieldInfos[i], ref _myDataList[i]); } }
public override void ParsePacket(PacketParser parser) { ParsePacketHeader(parser); _status = parser.ParseByte();//alway 0 statement_id = parser.ParseUnsignedNumber(4); num_columns = parser.ParseUnsignedNumber(2); num_params = parser.ParseUnsignedNumber(2); parser.ParseFiller(1);//reserved_1 waring_count = parser.ParseUnsignedNumber(2); }
public override void ParsePacket(PacketParser parser) { ParsePacketHeader(parser); if (protocol41) { clientFlags = parser.ParseUnsigned4(); //4 maxPacketSize = parser.ParseUnsigned4(); //4 charsetNumber = parser.ParseByte(); parser.ParseFiller(23); user = parser.ParseNullTerminatedString(); scrambleBuff = parser.ParseLengthCodedBuffer(); database = parser.ParseNullTerminatedString(); } else { clientFlags = parser.ParseUnsigned2(); //2 maxPacketSize = parser.ParseUnsigned3(); //3 user = parser.ParseNullTerminatedString(); scrambleBuff = parser.ParseBuffer(8); database = parser.ParseLengthCodedString(); } }