Documentation
¶
Overview ¶
Package conn provides shared HTTP/1.1 and HTTP/2 connection handling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHijacked = errors.New("celeris: connection hijacked")
ErrHijacked is returned by ProcessH1 when the connection was hijacked. The engine must not close or reuse the FD after receiving this error.
Functions ¶
Types ¶
type H1State ¶
type H1State struct {
RemoteAddr string
HijackFn func() (net.Conn, error) // set by engine; nil if unsupported
// contains filtered or unexported fields
}
H1State holds per-connection H1 parsing state.
func NewH1State ¶
func NewH1State() *H1State
NewH1State creates a new H1 connection state with zero-copy header parsing.
type H2State ¶
type H2State struct {
// contains filtered or unexported fields
}
H2State holds per-connection H2 state.
func NewH2State ¶
NewH2State creates a new H2 connection state.
func (*H2State) SetRemoteAddr ¶ added in v1.1.0
SetRemoteAddr sets the remote address on the H2 stream manager so that all streams created on this connection inherit the peer address.
Click to show internal directories.
Click to hide internal directories.