Documentation
¶
Overview ¶
Package http2 implements HTTP/2 protocol support for the tunnel library.
This package provides HTTP/2 protocol forwarding with stream multiplexing support. It requires TLS configuration for secure connections.
Example ¶
cfg := &tls.Config{
Certificates: []tls.Certificate{cert},
}
p := http2.New(cfg)
listener, _ := p.Listen(":8443")
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureServer ¶
ConfigureServer configures an HTTP/2 server.
func ConfigureTransport ¶
ConfigureTransport configures an HTTP/2 transport.
Types ¶
type Protocol ¶
type Protocol struct {
// contains filtered or unexported fields
}
Protocol implements HTTP/2 protocol forwarding.
func New ¶
New creates a new HTTP/2 protocol handler. The tlsConfig is required for HTTP/2 connections.
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream represents an HTTP/2 stream.
func (*Stream) IsServerInitiated ¶
IsServerInitiated returns true if the stream was initiated by the server.
Click to show internal directories.
Click to hide internal directories.