Module server
Available on crate feature
net only.Expand description
Http server utility types and services.
HttpPeekRouterallows you to detect http/1x and h2 traffic. H3 traffic is not covered by this router as this is done via sidechannel information instead (e.g. ALPN in TLS).
Modules§
- peek
- types and logic for
HttpPeekRouter
Structs§
- Http
Peek Config - Resource limits used while detecting HTTP on a byte stream.
- Http
Peek Router - A
Servicerouter that can be used to support http/1x and h2 traffic as well as non-tls traffic. - NoHttp
Reject Error - non-http connection is rejected
Enums§
Constants§
- DEFAULT_
HTTP1_ REQUEST_ LINE_ MAX_ SIZE - Default maximum number of bytes inspected for an HTTP/1 request-line.
- DEFAULT_
HTTP_ PEEK_ READ_ BUFFER_ SIZE - Default maximum number of bytes requested from the transport per peek read.
Functions§
- peek_
http_ input - Detect HTTP using
HttpPeekConfig::defaultand return an input that replays every byte consumed during detection. - peek_
http_ input_ with_ config - Detect HTTP using explicit resource limits and return an input that replays every byte consumed during detection.
Type Aliases§
- Http
Prefixed Io PrefixedIoalias used byHttpPeekRouter.