Skip to main content

decode_request_and_dispatch

Function decode_request_and_dispatch 

Source
pub fn decode_request_and_dispatch(
    request_body: &[u8],
    endpoint: BrokerHttpEndpoint,
) -> Result<Vec<u8>, GetHttpEndpointError>
Expand description

Decode an incoming GetBrokerHttpEndpointRequest frame body and produce a serialized GetBrokerHttpEndpointResponse body the connection loop can write back via protocol::write_frame.

The request currently has no fields (GetBrokerHttpEndpointRequest is an empty marker per #483 §4) — decoding is purely validation that the peer sent a structurally well-formed proto message of the expected type.