Skip to main content

validate_client_setup

Function validate_client_setup 

Source
pub fn validate_client_setup(msg: &ClientSetup) -> Result<(), SetupError>
Expand description

Validate a CLIENT_SETUP message.

Section 8.2.2.2 puts no role restriction on MAX_SUBSCRIBE_ID: it “communicates an initial value for the Maximum Subscribe ID to the receiving subscriber”, which is something either endpoint may do, and a client that grants the server a subscribe budget during setup is doing exactly that. PATH is the restricted parameter, and it belongs to the client, so a CLIENT_SETUP is where it is legal.

§Errors

SetupError::EmptyVersionList if no version is offered.