Documentation
¶
Index ¶
- Constants
- func Dial(ctx context.Context, u *url.URL, hdr http.Header) (*webtransport.Session, error)
- func ExtractAltSvcEndpoints(h http.Header, protocolId string) []string
- func ExtractURLPort(u *url.URL) string
- func Graft(base, alt string) string
- func Hyperlink(name, url string) string
- func Listen(u string) (*listener, error)
- func MaybeHyperlink(l string) string
- func Serve(u string, handler http.Handler) error
- func ToIdna(s string) string
- type StreamConn
Constants ¶
const MaxIncomingStreams int64 = 1 << 60
2^60 == 1152921504606846976
Variables ¶
This section is empty.
Functions ¶
func Dial ¶ added in v0.0.3
Dial is a wrapper around webtransport.Dial with automatic HTTP/3 service discovery
func ExtractAltSvcEndpoints ¶ added in v0.0.7
ExtractAltSvcH3Endpoints reads Alt-Svc header returns a list of [host]:port endpoints
func ExtractURLPort ¶ added in v0.0.7
ExtractURLPort returns the :port part from URL.Host (host[:port])
An empty string is returned if no port is found
func Graft ¶ added in v0.0.7
Graft returns Host(base):Port(alt)
assuming - base is host[:port] - alt is [host]:port
func Hyperlink ¶ added in v0.0.9
Print Hyperlink via OSC 8 ansi sequence. The syntax is: 'OSC 8 ; params ; url ST text OSC 8 ; ; ST' for more info see https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
func MaybeHyperlink ¶ added in v0.1.0
MaybeHyperlink turns input into ANSI hyperlink when stdin is a tty
Types ¶
type StreamConn ¶
type StreamConn struct {
webtransport.Stream
Session *webtransport.Session
}
StreamsConn wraps webtransport.Stream into net.Conn
func (*StreamConn) LocalAddr ¶
func (sc *StreamConn) LocalAddr() net.Addr
LocalAddr is required to impl net.Conn
func (*StreamConn) RemoteAddr ¶
func (sc *StreamConn) RemoteAddr() net.Addr
RemoteAddr is required to impl net.Conn