MySQLPacket.decodeInitialHandshake constructor
MySQLPacket.decodeInitialHandshake(
- Uint8List buffer
Decodifica um pacote de handshake inicial MySQLPacketInitialHandshake.
Implementation
factory MySQLPacket.decodeInitialHandshake(Uint8List buffer) {
final header = decodePacketHeader(buffer);
final payloadBytes = _extractPayload(buffer, header.$1);
final payload = MySQLPacketInitialHandshake.decode(payloadBytes);
return MySQLPacket(
sequenceID: header.$2,
payloadLength: payloadBytes.length,
payload: payload,
);
}