Skip to main content

peek_client_hello_from_input

Function peek_client_hello_from_input 

pub async fn peek_client_hello_from_input<PeekableInput>(
    input: PeekableInput,
) -> Result<(<PeekableInput as PeekIoProvider>::Mapped<PrefixedIo<HeapReader, <PeekableInput as PeekIoProvider>::PeekIo>, PrefixedIo<ReplayReader, <PeekableInput as PeekIoProvider>::PeekEgressIo>>, Option<ClientHello>), Error>
where PeekableInput: PeekIoProvider, <PeekableInput as PeekIoProvider>::PeekIo: Unpin, <PeekableInput as PeekIoProvider>::PeekEgressIo: Unpin,
Available on crate feature tls only.
Expand description

Functional API to try to peek TLS:CH from an existing I/O input, returning the stream as-is with the read data prefixed from memory.

A cutoff invokes the fallback. Use peek_client_hello_from_input_with_config to pass PeekOptions. Unparseable TLS also selects fallback by default; use peek_client_hello_from_input_with_policies to opt into rejection or obtain the inspection status.

Use PeekTlsClientHelloService if you prefer it as a rama Service instead.