quic

package
v0.5.30 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GoQuicConnsAccepted = expvar.NewInt("go_quic_conns_accepted")
	GoQuicConnsOpened   = expvar.NewInt("go_quic_conns_opened")
	GoQuicConnsClosed   = expvar.NewInt("go_quic_conns_closed")
)
View Source
var MaxBidiRemoteStreams int64 = 1 << 60

2^60 == 1152921504606846976

View Source
var TLSConfig = &tls.Config{
	InsecureSkipVerify: true,
	MinVersion:         tls.VersionTLS13,
}

Functions

func Listen

func Listen(ctx context.Context, addr string) (*common.Listener, error)

Types

type QuicSession

type QuicSession struct {
	Session *quic.Conn
}

func Dial

func Dial(ctx context.Context, addr string) (*QuicSession, error)

func (*QuicSession) Accept

func (s *QuicSession) Accept(ctx context.Context) (tunnel.Stream, error)

func (*QuicSession) Close

func (s *QuicSession) Close() error

func (*QuicSession) Open

func (s *QuicSession) Open(ctx context.Context) (tunnel.Stream, error)

type StreamConn

type StreamConn struct {
	*quic.Stream
	Session *quic.Conn
}

StreamsConn wraps quic.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

func (*StreamConn) SetDeadline

func (sc *StreamConn) SetDeadline(time.Time) error

SetDeadline is required to impl net.Conn

func (*StreamConn) SetReadDeadline

func (sc *StreamConn) SetReadDeadline(time.Time) error

SetReadDeadline is required to impl net.Conn

func (*StreamConn) SetWriteDeadline

func (sc *StreamConn) SetWriteDeadline(time.Time) error

SetWriteDeadline is required to impl net.Conn

type Transport

type Transport struct{}

func (*Transport) Dial

func (t *Transport) Dial(ctx context.Context, addr string) (tunnel.Session, error)

func (*Transport) Listen

func (t *Transport) Listen(ctx context.Context, addr string) (net.Listener, error)

type Upgrader added in v0.5.24

type Upgrader struct {
	Listener *quic.Endpoint
	HOST     string
}

func (*Upgrader) Root added in v0.5.24

func (s *Upgrader) Root() string

func (*Upgrader) Upgrade added in v0.5.24

func (s *Upgrader) Upgrade() (*edge.Edge, error)

Jump to

Keyboard shortcuts

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