quic

package module
v0.0.0-...-8ac4b46 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug = false

Functions

func InitQuic

func InitQuic(gate *ugate.UGate)

Not in init

Types

type DataStreamer

type DataStreamer interface {
	DataStream() quic.Stream
}

DataSreamer is implemented by response writer on server side to take over the stream.

type Quic

type Quic struct {
	Auth *meshauth.MeshAuth

	// UgateSVC - for node tracking
	UG *ugate.UGate
	// contains filtered or unexported fields
}

Quic is the adapter to QUIC/H3/MASQUE for uGate.

func New

func New(ug *ugate.UGate, ll *meshauth.PortListener) *Quic

func (*Quic) DialMux

func (qd *Quic) DialMux(ctx context.Context, node *ugate.MeshCluster) (*QuicMUX, error)

func (*Quic) Start

func (qd *Quic) Start() error

type QuicMUX

type QuicMUX struct {
	// contains filtered or unexported fields
}

QuicMUX is a mux to a specific node. May be accepted or dialed. Equivalent with quic/h3/client.go ( when dialing ), and Quic server when accepting.

func (*QuicMUX) Close

func (ugs *QuicMUX) Close() error

func (*QuicMUX) DialContext

func (ugs *QuicMUX) DialContext(ctx context.Context, net, addr string) (net.Conn, error)

DialContext uses the current association to open a stream.

Note that H3 is handled separately - this is an L4 use of QUIC, similar to SSH.

type QuicNetCon

type QuicNetCon struct {
	quic.Stream
}

func (QuicNetCon) LocalAddr

func (q QuicNetCon) LocalAddr() net.Addr

func (QuicNetCon) RemoteAddr

func (q QuicNetCon) RemoteAddr() net.Addr

Jump to

Keyboard shortcuts

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