MySQLPacket.decodeInitialHandshake constructor
MySQLPacket.decodeInitialHandshake(
- Uint8List buffer
Implementation
factory MySQLPacket.decodeInitialHandshake(Uint8List buffer) {
int offset = 0;
final header = MySQLPacket.decodePacketHeader(buffer);
offset += 4;
final payloadLength = header.item1;
final sequenceNumber = header.item2;
final payload = MySQLPacketInitialHandshake.decode(
Uint8List.sublistView(buffer, offset),
);
return MySQLPacket(
sequenceID: sequenceNumber,
payloadLength: payloadLength,
payload: payload,
);
}