fn check_version_compatibility(
stream: &mut TcpStream,
) -> Result<(), HandshakeError>Expand description
Validates the initial handshake packet sent by a newly connected client.
Verifies the custom magic string protocol identifier, deserializes the client’s version details,
compares the protocol hash against the running server version, and transmits the appropriate
[HandshakeResponse] back across the stream.
§Arguments
stream- A mutable reference to the client’sTcpStream.