Module peek
Available on crate feature
net only.Expand description
types and logic for HttpPeekRouter
Structs§
- H2Acceptor
- Type wrapper used by
HttpPeekRouter::new_h2to only serve h2, and send http/1x to the fallback. - Http1
Acceptor - Type wrapper used by
HttpPeekRouter::new_http1to only serve http/1x, and send h2 to the fallback. - Http
Auto Acceptor - Type wrapper used by
HttpPeekRouter::newto serve http/1x and h2 with a single service. - Http
Dual Acceptor - Type wrapper used by
HttpPeekRouter::new_dualto serve http/1x and h2 separately. - 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.