shttp3

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: Apache-2.0 Imports: 7 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: Dial,
}

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

Functions

func Dial

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

Dial is the Dial function used in RoundTripper

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 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