quicServer

package
v0.9.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

Option is a function that sets optional parameters for the Server.

func WithTLSConfig

func WithTLSConfig(tlsConfig *tls.Config) Option

WithTLSConfig sets a TLS configuration for the HTTP server and creates a TLS listener.

type Options

type Options struct {
	// contains filtered or unexported fields
}

Options struct holds parameters that can be configure using functions with prefix With.

type Server

type Server struct {
	*http3.Server
}

Server wraps http3.Server to provide methods for resenje.org/web/servers.Server interface.

func New

func New(handler http.Handler, opts ...Option) (s *Server)

New creates a new instance of Server.

func (*Server) QuicHeadersHandler

func (s *Server) QuicHeadersHandler(h http.Handler) http.Handler

QuicHeadersHandler should be used as a middleware to set quic related headers to TCP server that suggest alternative svc.

func (*Server) ServeUDP

func (s *Server) ServeUDP(conn *net.UDPConn) (err error)

ServeUDP serves requests over UDP connection.

func (*Server) Shutdown

func (s *Server) Shutdown(_ context.Context) (err error)

Shutdown calls http3.Server.Close method.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL