Skip to main content

validate_setup

Function validate_setup 

Source
pub fn validate_setup(msg: &Setup, sender: Role) -> Result<(), SetupError>
Expand description

Validate a unified SETUP message from the endpoint named by sender.

Draft-17 merges the two setup messages into one and uses ALPN for version negotiation, so there are no versions to check and nothing in the message itself says which end sent it. That makes the sender an argument: Section 9.4.1.2 says the PATH parameter “MUST NOT be used by the server”, and with one message type for both directions the caller is the only thing that knows which direction this is.

§Errors

SetupError::WrongOptionRole if a server sent a PATH.