Skip to main content

parse_handshake_frame

Function parse_handshake_frame 

Source
pub fn parse_handshake_frame(data: &[u8]) -> Option<(String, PeerProfile)>
Expand description

Parse a handshake frame → (sender, advertised profile). None when data is not a handshake (no magic) or is malformed — so a data message is never mistaken for one, and an unknown/garbage profile is ignored rather than mis-applied.