shttp3

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

README

HTTP/3 over SCION

This package contains glue code to use the quic-go/http3 libraries for HTTP/3 over SCION.

Usage of this package is analogous to pkg/shttp, and thus analogous to using the net/http standard library.

Documentation

Overview

package shttp3 provides glue to use quic-go/http3 libraries for HTTP/3 over SCION.

Index

Constants

This section is empty.

Variables

View Source
var DefaultTransport = &http3.RoundTripper{
	Dial: (&Dialer{
		Policy: nil,
	}).Dial,
}

DefaultTransport is the default RoundTripper that can be used for HTTP/3 over SCION.

Functions

func ListenAndServe

func ListenAndServe(addr string, certFile, keyFile string, handler http.Handler) error

ListenAndServe listens on the SCION/UDP address addr and calls the handler for HTTP/3 requests on incoming connections. http.DefaultServeMux is used when handler is nil.

Types

type Dialer added in v0.5.0

type Dialer struct {
	Local  netaddr.IPPort
	Policy pan.Policy
	// contains filtered or unexported fields
}

Dialer dials a QUIC connection over SCION. This is the Dialer used for shttp3.DefaultTransport.

func (*Dialer) Dial added in v0.5.0

func (d *Dialer) Dial(network, addr string, tlsCfg *tls.Config,
	cfg *quic.Config) (quic.EarlySession, error)

Dial dials a QUIC connection over SCION.

func (*Dialer) SetPolicy added in v0.5.0

func (d *Dialer) SetPolicy(policy pan.Policy)

type Server

type Server struct {
	*http3.Server
}

Server wraps a http3.Server making it work with SCION

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

ListenAndServe listens on the UDP address s.Addr and calls s.Handler to handle HTTP/3 requests on incoming connections.

func (*Server) Serve

func (s *Server) Serve(conn net.PacketConn) error

Jump to

Keyboard shortcuts

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