Documentation
¶
Overview ¶
package shttp provides glue to use net/http libraries for HTTP over SCION.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultTransport = &http.Transport{ Proxy: http.ProxyFromEnvironment, DialContext: (&Dialer{ QuicConfig: nil, }).DialContext, ForceAttemptHTTP2: true, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, }
DefaultTransport is the default RoundTripper that can be used for HTTP over SCION/QUIC. This is equivalent to net/http.DefaultTransport with DialContext overridden to use shttp.Dialer, which dials connections over SCION/QUIC.
Functions ¶
func ListenAndServe ¶
ListenAndServe listens for HTTP connections on the SCION address addr and calls Serve with handler to handle requests
func ListenAndServeTLS ¶ added in v0.4.0
ListenAndServe listens for HTTPS connections on the SCION address addr and calls Serve with handler to handle requests
func MangleSCIONAddrURL ¶
MangleSCIONAddrURL mangles a SCION address in the host part of a URL-ish string so that it can be safely used as a URL, i.e. it can be parsed by net/url.Parse
Types ¶
type Dialer ¶ added in v0.4.0
Dialer dials an insecure, single-stream QUIC connection over SCION (just pretend it's TCP). This is the Dialer used for shttp.DefaultTransport.
type Server ¶
Server wraps a http.Server making it work with SCION
func (*Server) ListenAndServe ¶
ListenAndServe listens for QUIC connections on srv.Addr and calls Serve to handle incoming requests