mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-29 21:00:54 +00:00
Add length of HandshakeResponsePacket
This commit is contained in:
parent
b6af918ac1
commit
8d15a8e97b
@ -161,5 +161,11 @@ impl Serialize for HandshakeResponsePacket {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get length in little endian bytes
|
||||
// packet length = byte[0] + (byte[1]<<8) + (byte[2]<<16)
|
||||
buf[0] = buf.len().to_le_bytes()[0];
|
||||
buf[1] = buf.len().to_le_bytes()[1];
|
||||
buf[2] = buf.len().to_le_bytes()[2];
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user