Documentation ¶
Index ¶
- func ConfigureServer(s *fasthttp.Server) *http2.Server
- func ConfigureServerAndConfig(s *fasthttp.Server, tlsConfig *tls.Config) *http2.Server
- type ServerAdaptor
- func (sa *ServerAdaptor) OnFrame(strm *http2.Stream, fr *http2.FrameHeader, dec *http2.HPACK) error
- func (sa *ServerAdaptor) OnNewStream(c net.Conn, strm *http2.Stream)
- func (sa *ServerAdaptor) OnRequestFinished(strm *http2.Stream, enc *http2.HPACK, writer chan<- *http2.FrameHeader)
- func (sa *ServerAdaptor) OnStreamEnd(strm *http2.Stream)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureServer ¶
ConfigureServer configures the fasthttp server to handle HTTP/2 connections. The HTTP/2 connection can be only established if the fasthttp server is using TLS.
Future implementations may support HTTP/2 through plain TCP.
func ConfigureServerAndConfig ¶ added in v0.0.4
ConfigureServerAndConfig configures the fasthttp server to handle HTTP/2 connections and your own tlsConfig file. If you are NOT using your own tls config, you may want to use ConfigureServer.
Types ¶
type ServerAdaptor ¶
type ServerAdaptor struct {
// contains filtered or unexported fields
}
func NewServerAdaptor ¶
func NewServerAdaptor(s *fasthttp.Server) *ServerAdaptor
func (*ServerAdaptor) OnFrame ¶
func (sa *ServerAdaptor) OnFrame( strm *http2.Stream, fr *http2.FrameHeader, dec *http2.HPACK, ) error
func (*ServerAdaptor) OnNewStream ¶
func (sa *ServerAdaptor) OnNewStream(c net.Conn, strm *http2.Stream)
func (*ServerAdaptor) OnRequestFinished ¶
func (sa *ServerAdaptor) OnRequestFinished( strm *http2.Stream, enc *http2.HPACK, writer chan<- *http2.FrameHeader, )
func (*ServerAdaptor) OnStreamEnd ¶
func (sa *ServerAdaptor) OnStreamEnd(strm *http2.Stream)
Click to show internal directories.
Click to hide internal directories.