fn validate_peer_params(&mut self, params: &TransportParameters) -> Result<(), TransportError> {
        if Some(self.orig_rem_cid) != params.initial_src_cid
            || (self.side.is_client()
                && (Some(self.initial_dst_cid) != params.original_dst_cid
                    || self.retry_src_cid != params.retry_src_cid))
        {
            return Err(TransportError::TRANSPORT_PARAMETER_ERROR(
                "CID authentication failure",
            ));
        }
        if params.initial_max_streams_bidi > MAX_STREAM_COUNT
            || params.initial_max_streams_uni > MAX_STREAM_COUNT
        {
            return Err(TransportError::STREAM_LIMIT_ERROR(
                "unrepresentable initial stream limit",
            ));
        }

        Ok(())
    }
/// Validate transport parameters received from the peer
Validate transport parameters received from the peer
Validate transport parameters received from the peer
fn validate_peer_params(&mut self, params: &TransportParameters) -> Result<(), TransportError> {
        if Some(self.orig_rem_cid) != params.initial_src_cid
            || (self.side.is_client()
                && (Some(self.initial_dst_cid) != params.original_dst_cid
                    || self.retry_src_cid != params.retry_src_cid))
        {
            return Err(TransportError::TRANSPORT_PARAMETER_ERROR(
                "CID authentication failure",
            ));
        }
        if params.initial_max_streams_bidi > MAX_STREAM_COUNT
            || params.initial_max_streams_uni > MAX_STREAM_COUNT
        {
            return Err(TransportError::STREAM_LIMIT_ERROR(
                "unrepresentable initial stream limit",
            ));
        }
        Ok(())
    }
fn validate_peer_params ( & mut self , params : & TransportParameters ) -> Result < ( ) , TransportError > { if Some ( self . orig_rem_cid ) != params . initial_src_cid || ( self . side . is_client ( ) && ( Some ( self . initial_dst_cid ) != params . original_dst_cid || self . retry_src_cid != params . retry_src_cid ) ) { return Err ( TransportError :: TRANSPORT_PARAMETER_ERROR ( " " , ) ) ; } if params . initial_max_streams_bidi > MAX_STREAM_COUNT || params . initial_max_streams_uni > MAX_STREAM_COUNT { return Err ( TransportError :: STREAM_LIMIT_ERROR ( " " , ) ) ; } Ok ( ( ) ) }
Validate transport parameters received from the peer
Validate transport parameters received from the peer
&mut self
params
&TransportParameters